chrischen
05-24-2008, 08:00 PM
I have a table in FLEX that loads data from an XML file. Once the data is loaded the user can drag and drop the rows into a new order.
I currently use this PHP code to take table data serialized by the prototype ajax framework into an array to be inserted into a database. How can I do this in FLEX so that the new order can be sent to a PHP script?
$ranking = 101;
foreach ($_POST['playlist'] as $id) {
$updateSQL = sprintf("UPDATE playlistItems SET `pos`=%s WHERE `id`=%s",
GetSQLValueString($ranking, "int"),
GetSQLValueString($id, "int"));
mysql_select_db($database_list, $list);
$Result1 = mysql_query($updateSQL, $list) or die(mysql_error());
$ranking--;
}
I currently use this PHP code to take table data serialized by the prototype ajax framework into an array to be inserted into a database. How can I do this in FLEX so that the new order can be sent to a PHP script?
$ranking = 101;
foreach ($_POST['playlist'] as $id) {
$updateSQL = sprintf("UPDATE playlistItems SET `pos`=%s WHERE `id`=%s",
GetSQLValueString($ranking, "int"),
GetSQLValueString($id, "int"));
mysql_select_db($database_list, $list);
$Result1 = mysql_query($updateSQL, $list) or die(mysql_error());
$ranking--;
}