So I have the following code, I have made sure that both the variables have something stored in them, by echoing the results in both $lat and $long
$lat = $latitude;
$updatelat = mysql_query("UPDATE listings SET lat='". $lat ."' WHERE id='". $id ."'");
$long = $longitude;
$updatelong = mysql_query("UPDATE listings SET long='". $long ."' WHERE id='". $id ."'");
The $updatelat query works absolutely perfect, and the value is set in the database.
The $updatelong query however doesn't work, but there is definitely a value stored in $long
Can anyone see something obviously wrong with this code? There is definitely a column called long in my database. I am completely confused.
$long? You might have an escaping issue.mysql_*api (which you should do anyway because it's deprecated in PHP5 and gone from PHP7. ;) )