Hi everyone!
I'm having an issue with inserting with PHP/MySQLi and in the hope that I'm just doing something stupid I'm here to ask for help.
This is a a snippet of the code. I can share the full code if needed, but as other people are using this same code without an issue I'm not sure if this is the problem.
$result = $database->query("INSERT INTO `tcgs` (`name`,`url`,`cardsurl`,`cardspath`,`defaultauto`,`autoupload`,`lastupdated`,`status`,`format`) VALUE ('$name','$url','$cardsurl','$cardspath','$defaultauto','$autoupload','$today','$status','$format')");
if ( !$result ) { $error[] = "Error inserting row. ".mysqli_error().""; }
Thanks in advance for any help!
Without seeing the rest of your code it's hard to say - but I would ask
1) are you able to open the connection to the database without error
2) do you have the tcgs table in your database
3) are you passing all of those variables to the function / script you are trying to run
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community