Can someone please help me interpret this format as an insert and update statement. I'm use to writing php the old way.
//insert gameid,player_id,starttime,submitted values :gameid, //:player_id,now(),'N'
//insert statement will send the insert id back as json
Update statement will get the update as :pending_score_id and update that table id.
Inserts and Updates are more simple than Selects, because you don't have to fetch anything. Just call the prepare method:
Be sure to bind the parameters (values) that you will be inserting or updating:
And then call the execute method:
And finally you can grab the inserted ID using the lastinsertid method:
|All times are GMT +1. The time now is 08:36 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.