I have a code which lists all my results from results_group then I edit a number the "group1" box and I want to set this number as order in the update code.... when clicking save it does this
<?php
if ($action == "save")
{
$c = 1;
$result5 = mysql_query ("SELECT * From results_group where comp_run_id = $comp_run_id");
while($row5 = mysql_fetch_array($result5)) {
$group_id = $row5[group_id];
echo $group_id;
$result = mysql_query ("update results_group set order = '$group1' where group_id = $group_id") or die("INSERT error0: ".mysql_error());
}
?>
This is my error
38INSERT error0: You have an error in your SQL syntax near 'order = '38' where group_id = 38' at line 1
Any ideas how to fix it..