$db = new mysqli('localhost','x','x','rock');
$q = $db->query("INSERT INTO names (name,surname) VALUES ('jack','daniel')");
var_dump($q); // boolean true
echo $db->info;
doing everything as described in manual but still returns nothing.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If the
insertstatement is one of the belowinfofunction will return resultAnd your insert is not satisfying this condition.
you have
INSERT INTO names (name,surname) VALUES ('jack','daniel')if you change this to insert more than one record you will see the result from
infofunctionif you change your insert query to insert multiple record in once you will get result
Try with below
INSERT INTO names (name,surname) VALUES ('jack','daniel'),('jack2','daniel2')