MySQL "UPDATE" not working? -


so have following code, have made sure both variables have stored in them, echoing results in both $lat , $long

    $lat = $latitude;     $updatelat = mysql_query("update listings set lat='". $lat ."' id='". $id ."'");     $long = $longitude;     $updatelong = mysql_query("update listings set long='". $long ."' id='". $id ."'"); 

the $updatelat query works absolutely perfect, , value set in database.

the $updatelong query doesn't work, there value stored in $long

can see wrong code? there column called long in database. confused.

why 2 queries? can in 1 id same.

$lat = $latitude; $long = $longitude; $updatelatlong = mysqli_query($connection, "update listings set lat='". $lat ."',long='". $long ."' id='". $id ."'"); 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

c - getting error: cannot take the address of an rvalue of type 'int' -

How to merge four videos on one screen with ffmpeg -