{"action":"created","issue":{"url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/252","labels_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/252/labels{/name}","comments_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/252/comments","events_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/252/events","html_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/issues/252","id":92355753,"number":252,"title":"UPDATE after INSERT failing (Call to a member function execute() on a non-object))","user":{"login":"jonnysmith1981","id":8254912,"avatar_url":"https://avatars.githubusercontent.com/u/8254912?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnysmith1981","html_url":"https://github.com/jonnysmith1981","followers_url":"https://api.github.com/users/jonnysmith1981/followers","following_url":"https://api.github.com/users/jonnysmith1981/following{/other_user}","gists_url":"https://api.github.com/users/jonnysmith1981/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnysmith1981/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnysmith1981/subscriptions","organizations_url":"https://api.github.com/users/jonnysmith1981/orgs","repos_url":"https://api.github.com/users/jonnysmith1981/repos","events_url":"https://api.github.com/users/jonnysmith1981/events{/privacy}","received_events_url":"https://api.github.com/users/jonnysmith1981/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-01T11:23:06Z","updated_at":"2015-07-01T12:15:29Z","closed_at":null,"body":"I have a chuck of PHP code that does an initial insert and returns an id. This works fine. I then need to do some more processing then update that record. The code is as follows:\r\n\r\n\t$custid = $db->insert('Cust_T', $appdata);\r\n\r\n        <do some more processing>\r\n\r\n\t$db->where('customer_id' ,$custid);\r\n\t$db->update('Cust_T', $referencedata);\r\n\r\nSo the initial INSERT work, but then the subsequent UPDATE fails with the following error:\r\n\r\nCall to a member function execute() on a non-object in /var/www/www.mywebapp.com/public_html/lib/mysqlidb.php on line 444"},"comment":{"url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/comments/117637489","html_url":"https://github.com/joshcam/PHP-MySQLi-Database-Class/issues/252#issuecomment-117637489","issue_url":"https://api.github.com/repos/joshcam/PHP-MySQLi-Database-Class/issues/252","id":117637489,"user":{"login":"jonnysmith1981","id":8254912,"avatar_url":"https://avatars.githubusercontent.com/u/8254912?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnysmith1981","html_url":"https://github.com/jonnysmith1981","followers_url":"https://api.github.com/users/jonnysmith1981/followers","following_url":"https://api.github.com/users/jonnysmith1981/following{/other_user}","gists_url":"https://api.github.com/users/jonnysmith1981/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnysmith1981/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnysmith1981/subscriptions","organizations_url":"https://api.github.com/users/jonnysmith1981/orgs","repos_url":"https://api.github.com/users/jonnysmith1981/repos","events_url":"https://api.github.com/users/jonnysmith1981/events{/privacy}","received_events_url":"https://api.github.com/users/jonnysmith1981/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T12:15:29Z","updated_at":"2015-07-01T12:15:29Z","body":"No, nothing.\r\n\r\nI am not sure if it#s clear from my first post, but the insert and update are being done in the same PHP file. This is ok isnt it? I had problems in the past with mysqli and multiple prepared statements if i did not use the Store_result() function."}}