I am running on Host Gator and using a mySQL backend, with phpMyAdmin as a GUI.
I am coding in PHP.
I have had no issues performing standard prepare statements, but all of a sudden, with my first delete statement, there seems to be an error. I cannot spot or debug it. The following code is where the error occurs.
//Error occurs right here
if(!($sql = $con->prepare("DELETE FROM quoteItems WHERE quoteID=?")))
{ echo "FAIL - Prepare failed: (" . $con->errno . ") " . $con->error;}
if(!$sql->bind_param('i', $quoteID))
{echo "FAIL - Binding parameters failed: (" . $sql->errno . ") " . $sql->error;}
if(!$sql->execute())
{echo "FAIL - Execute failed: (" . $sql->errno . ") " . $sql->error;}
The output of var_dump($quoteID);
gives string "44"
in my current situation.
The error message that is produced is FAIL - Prepare failed:(0) Fatal Error: Call to a member function bind_param() on a non-object