I am having trouble updating a MySQL DB using JQuery Sortable and PHP. I believe everything else is working fine, my UPDATE query is just not working, and I'm not getting an error message when I use the 'or die' statement. Here is my update syntax:
<?php
//Database Connection Info (working properly)
...
foreach ($_GET['listItem'] as $position => $id) :
$sql[] = "UPDATE `people` SET `position` = $position WHERE `id` = $id";
$sqlUpdate = $sql[$position];
mysql_query($sqlUpdate) or die("Query failed: Update");
endforeach;
$sqlSort = "SELECT * FROM `people` ORDER BY `id` ASC";
mysql_query($sqlSort) or die ("Query failed: Sort2");
?>