On 26/08/10 10:22, Alan Chandler wrote:
> I am using PHP PDO to access sqlite and have reached a peculiar error
> situation.  Basically its saying I can't have parameters in a CREATE
> VIEW sql statement when I am preparing it.

The plot thickens

I replaced all the parameter placeholders with a quoted version of the 
parameter and undertook the prepare statement again.

This time it reported that the view it would have created failed because 
the table (view) already existed.

Is it correct to undertake the semantic validation at prepare time?

In my code, I delete the view before attempting to recreate it by 
executing the prepared statement.  Isn't that the time to validate 
whether there are semantic problems with the statement?

The reason I was pre-preparing the statement was to limit the time I 
have to lock the database with a "BEGIN IMMEDIATE" (and the later 
"COMMIT").
-- 
Alan Chandler
http://www.chandlerfamily.org.uk

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to