in reply to Re: Using prepared_cache with placholders
in thread Using prepared_cache with placholders
Sorry, should have posted the error. I'm guessing that according to SQLite, the SQL does change. My prepared_cached statement goes from:
UPDATE twsJobs SET command = ? WHERE jobId = ?";to:
UPDATE twsJobs SET ? = ? WHERE jobId = ?";and the error I receive is:
DBD::SQLite::db prepare_cached failed: near "?": syntax error at...Evidently, by changing the column name SQLite feels I'm altering the SQL and therefore I get the error with placeholders. By placing the column name in place of the 1st ?, the SQL runs fine. If I can't have a placeholder for the column names, I need to generate the SQL statement each time. I'm hoping some monk may be able to give me insight into how to have a placeholder for the column name.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using prepared_cache with placholders
by ikegami (Patriarch) on Apr 04, 2010 at 00:05 UTC |