No results are returned when php connects to the mysql database to execute SQL statements! When a newbie first came into contact with the connection operation between php and mysql databases, he imitated the following code in the book and found that he could connect to the database, but the SQL statement was always not executed, the SQL statement is okay. it can be successfully executed in phpMyAdmin, but it won't work here. please try again and see what the problem is.
Reply to discussion (solution)What is the error?
What is output by the program?
The program does not report an error, but the database is not successfully inserted.
What is the error?
Add an empty string to the output error.
What is output by the program?
Haha, sorry, I made an oolong myself. I didn't give this user permission in my mysql database, so I couldn't modify the database. it would be nice after I gave the permission. thank you!
What is output by the program?
Try it like this. If ($ result) {echo "OK ";}
Else die ('Error: '. mysqli_error ());
Mysqli_close ($ connID );