-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Hi im using yours class. And im trying insert data to mysql base. if exists this row then need update. for this i used INSERT ... ON DUPLICATE KEY UPDATE... My code like this.
$db->rawQuery("INSERT INTO table1 (field1,field2,field3) VALUES (?,?,?) ON DUPLICATE KEY UPDATE field2=VALUES(field2),field3=VALUES(field3)", array("value1",value2,value2));
This code works file but when im trying put values from another array. My code like this: $db->rawQuery("INSERT INTO table1 (field1,field2,field3) VALUES (?,?,?) ON DUPLICATE KEY UPDATE field2=VALUES(field2),field3=VALUES(field3)", array($value[$i]['value1'],$value[$i]['value2'],$value[$i]['value3']));
it shows me this error:
Fatal error: Call to a member function fetch_field() on a non-object in /project/classes/mysqlidb.class.php on line 427
how i can solve this problem?