in reply to Syntax errors with Win32::ODBC?
For this particular problem, you're need to quote the statement correctly. You're missing the initial quote.
$SqlStatement = "insert into people values('" . $FORM_DATA{'first_name'} . "','" . $FORM_DATA{'last_name'} . "','" . $currentdate . "')";
Here I just took the simplistic approach with the string concat operator "." but you could use heredocs. Also you may want to look at DBI's quote method or placeholders so you don't have to do the database single quoting.
-derby
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Syntax errors?
by CodeNewbie (Initiate) on May 16, 2002 at 20:06 UTC |