Code: Select all
$songId = $id[0];
$updateQry = mysql_query("UPDATE hits SET song = '".$titles[0]."', artist = '".$artists[0]."', year = ".$years[0].", chart = ".$charts[0].", month = '".$months[0]."', quantity = ".$quantity[0]." WHERE ID = ".$songId) or die(mysql_error());
$selectQry = mysql_query("SELECT * FROM hits WHERE id = ".$songId);
while($row = mysql_fetch_array($result))
{
echo "<strong>New Data:</strong><br/>";
echo "ID: " . $row["ID"] . "<br/>";
echo "Title: " . $row["song"] . "<br/>";
echo "Artist: " . $row["artist"] . "<br/>";
echo "Year: " . $row["year"] . "<br/>";
echo "Chart: " . $row["chart"] . "<br/>";
echo "Month: " . $row["month"] . "<br/>";
echo "Quantity: " . $row["quantity"] . "<br/>";
}Chris
EDIT:
Oh and a couple of things I've done to debug, I've tried:
- Putting in a sleep command in between the two queries
- Running an SQL FLUSH CACHE statement
- Closing the database connection and opening it again
None of these seem to work.