Hello to all,
I am trying to setup a cutom perl script to access Mysql databases
through HTTP.
So far I can connect and show all information.
this is the code I used to showall
$sth=$dbh=DBI->connect("DBI:mysql:pizza","root","");
$sth->prepare("select * from Customer");
$sth->execute;
while(($phone,$name,$address,$citystatezip)=$sth->fetchrow())
{print"$phone $name<br>";}
$sth->finish;
Now I need two more code snips to complete the tasks of the script
1) search the database for a specifc phone number and display it.
I tried this code with no results:
$phonenumber="357-8236";
I know that this is in the database.
$sth=$dbh=DBI->connect("DBI:mysql:pizza","root","");
$sth->prepare("select * from Customer where phone=$phonenumber");
$sth->execute;
while(($temp_1)=$sth->fetchrow())
{print"$temp_1<br>";}
What am I doing wrong?
2) Once I find the data with a search I need to edit, save, or continue
on with the rest
of the script.
Please help
Brian Bratcher
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]