Note that there are some explanatory texts on larger screens.

plurals
  1. POUnsolvable MySQL error?
    primarykey
    data
    text
    <blockquote> <p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'repeat = 'week', location = 'Patowmack Farm', location_link = 'http://maps.googl' at line 1</p> </blockquote> <p>I keep getting this message for both my update script (show above), and my insert script. I cannot find why it's doing this! Anyone available to help?</p> <p>My update code:</p> <pre><code>foreach($_POST['enabled'] as $key =&gt; $value ) { $key = mysql_real_escape_string($key); if ($_POST['delete'][$key]=='1') { mysql_query("DELETE FROM upcoming WHERE id='$key'") or die(mysql_error()); } else { $title = mysql_real_escape_string($_POST['title'][$key]); $date = mysql_real_escape_string(($_POST['date'][$key])); $repeat = mysql_real_escape_string($_POST['repeat'][$key]); $group = mysql_real_escape_string($_POST['group'][$key]); $group_link = mysql_real_escape_string($_POST['group_link'][$key]); $location = mysql_real_escape_string($_POST['location'][$key]); $location_link = mysql_real_escape_string($_POST['location_link'][$key]); $notes = mysql_real_escape_string($_POST['notes'][$key]); $enabled = mysql_real_escape_string($_POST['enabled'][$key]); mysql_query("UPDATE upcoming SET title = '$title', date = '$date', repeat = '$repeat', location = '$location', location_link = '$location_link', group = '$group', group_link = '$group_link', notes = '$notes', enabled = '$enabled' WHERE id = '$key' LIMIT 1") or die(mysql_error()); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload