in reply to Re: Help my syntax
in thread Help my syntax

Hi thanks for writing!
I try it like you told me but is there something more I need to do to make it work because it just shows me the result page but without any data, and where I go to check the error log, this is what It said:
[Fri Dec 21 14:10:22 2007] [error] [client 127.0.0.1] DBD::mysql::st e +xecute failed: You have an error in your SQL syntax; check the manual + that corresponds to your MySQL server version for the right syntax t +o use near 'WHERE ped = '7010700'' at line 1 at c:\oracle\ora92\apach +e\apache\cgi-bin\patyped.pl line 55. [Fri Dec 21 14:10:22 2007] [error] [client 127.0.0.1] DBD::mysql::st f +etchall_arrayref failed: fetch() without execute() at c:\oracle\ora92 +\apache\apache\cgi-bin\patyped.pl line 60.
What is missing in there? Thanks :o)

Replies are listed 'Best First'.
Re^3: Help my syntax
by chromatic (Archbishop) on Dec 21, 2007 at 20:33 UTC

    That line should be:

    my $sql = "SELECT * FROM final WHERE pat = ? and ped = ?";

    The second WHERE is an error, per my reading of the MySQL documentation.