php and sqlite
Posted: Thu Jul 09, 2009 6:45 am
I have created a sqlite table using this SQL command:
and I'm inserting rows using this PHP code:
How can I get the auto-generated id?
Code: Select all
CREATE TABLE board (id INTEGER PRIMARY KEY,message TEXT, username TEXT, timestamp INTEGER);Code: Select all
sqlite_exec($db,"INSERT INTO board (username,message,timestamp) VALUES ('".$currentUser."','".sqlite_escape_string($GLOBALS['eyeCometPOC_Textbox']->text)."','".time()."');")