Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I remove the single quotes, etc and the query doesn't work. Thanks for any examples! -Michael P.S. My method of figuring the count is rather innefficient as well. Any pointer welcome.my $workspace = "my_workspace"; $mysql->query(q{ select * from workspace where name = '$workspace' } +);
$mysql->query(q{ select * from workspace where name = 'my_workspace' + }); my $i; my $record_set = $mysql->create_record_iterator; while (my $record = $record_set->each) { $i++; } if ($i) {print "found one!\n";}
20040915 Edit by broquaint: Changed title from 'Now to do simple select with Net::MySQL'
20040915 Edit by castaway: Changed title from 'Now to do simple select with Net::MySQL'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Now to do simple select with Net::MySQL
by chromatic (Archbishop) on Sep 15, 2004 at 00:57 UTC | |
by doowah2004 (Monk) on Sep 15, 2004 at 05:12 UTC | |
|
Re: Now to do simple select with Net::MySQL
by BUU (Prior) on Sep 15, 2004 at 00:58 UTC | |
|
Re: Now to do simple select with Net::MySQL
by borisz (Canon) on Sep 14, 2004 at 23:49 UTC | |
|
Re: Now to do simple select with Net::MySQL
by Velaki (Chaplain) on Sep 15, 2004 at 00:38 UTC | |
by Anonymous Monk on Sep 15, 2004 at 05:53 UTC | |
by hmerrill (Friar) on Sep 15, 2004 at 11:44 UTC | |
|
Re: Now to do simple select with Net::MySQL
by Anonymous Monk on Sep 15, 2004 at 04:01 UTC |