List:General Discussion« Previous MessageNext Message »
From:Rhino Date:March 20 2005 3:54pm
Subject:Re: update command
View as plain text  
----- Original Message ----- 
From: "Eko Budiharto" <ebudihar2004@stripped>
To: <ActivePerl@stripped>; <mysql@stripped>;
Sent: Sunday, March 20, 2005 10:04 AM
Subject: update command

> Hi,
> I am having problem with update command. I run it directy in the mysql
console, it works. But when I run it from perl, it does not work.
> here is the perl script
>  my $server2 = 'localhost';
>  my $db2 = '<database>';
>  my $username2 = '<username>';
>  my $password2 = '<password';
>  my $dbh2 = DBI->connect("dbi:mysql:$db2:$server2", $username2,
>  my $query = "UPDATE flightInfo SET route='chicago, atlanta' WHERE
passengerIndex='15' AND passengerName='Eko Budiharto';";
>  $dbh2->disconnect;
> I do not why the "UPDATE" command does not work with the script. Please
help. I thought I used wrong syntax.

Define "doesn't work".

Do you mean that you get a compile error or a runtime error? In either case
what message are you getting?

Or do you mean that the statement works but doesn't give the expected
result? For instance, perhaps it gives no error message but the update
doesn't appear to have taken place when you look at the data later?

Remember, we only know what you tell us and you haven't told us enough.


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 15/03/2005

Re: update commandRhino20 Mar