MySQL Forums
Forum List  »  PHP

Unknown system variable
Posted by: Thomas Dwyer
Date: February 28, 2018 01:44PM

Sorry if this is a simplistic question but I am new at this.

I have a PHP script that loops through an array and inserts in my MySQL DB the information. I get an intermittent "Unknown system variable" error. I say intermittent because as it loops through the data it is triggers at different points. I have searched forever and cannot find an answer - any help is appreciated.

Here is the code that is responsible for inserting into the DB

if ($result = $connection->query("INSERT INTO master_breweries(bdb_id, brewery_name, nameShortDisplay, description, website, established, isOrganic, `icon-image`, `medium-image`, `large-image`, `squareMedium`, `squareLarge`, status, createDate, updateDate) VALUES ('".$bdb_id."', '".$name."', '".$nameShortDisplay."', '".$description."', '".$website."', '".$established."', '".$isOrganic."', '".$icon."', '".$medium."', '".$large."', '".$squareMedium."', '".$squareLarge."', '".$status."', '".$createDate."', '".$updateDate."')")){
echo "$name - Success - $pc<br><br>";
else {
echo "$r - Error $name<br>";
if (!$connection->query("SET a=1")) {
printf("Errormessage: %s\n $pc<br><br>", $connection->error);
echo '<br>';

Would like to understand what this error is and how to fix.

Options: ReplyQuote

Written By
Unknown system variable
February 28, 2018 01:44PM
February 28, 2018 01:54PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.