in reply to Re^3: SQL Query error while executing in perl. Is it possible to execute these Scripts??
in thread SQL Query error while executing in perl. Is it possible to execute these Scripts??
you wan to tell SQL the value contained in the perl "$tim" variable, so you require perl's interpolation for THAT variable, so , use double-quotes.
Wrong. Most SQL engines require single quotes for values, and double quotes for otherwise illegal identifiers.
But don't use single-quotes, either. Use placeholders and only placeholders for any value passed to the database. Forget that quote exists at all. That method should be restricted to DBDs.
Use quote_identifier when you need to pass variable identifiers (most times, names of database objects like tables, views, columns, triggers, sequences, procedures) to the database.
Update: Sorry, I wrote nonsense.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: SQL Query error while executing in perl. Is it possible to execute these Scripts??
by mje (Curate) on Dec 06, 2010 at 16:11 UTC | |
by afoken (Chancellor) on Dec 08, 2010 at 12:58 UTC | |
|
Re^5: SQL Query error while executing in perl. Is it possible to execute these Scripts??
by NetWallah (Canon) on Dec 07, 2010 at 05:59 UTC | |
by afoken (Chancellor) on Dec 08, 2010 at 13:03 UTC |