tekrscom Posted May 27, 2007 Share Posted May 27, 2007 I was wondering if anyone would know why I can't update a longitude? Here's my code... $sqlquery = "UPDATE sites SET new_site_id = '$_POST[new_site_id]', site_id = '$_POST[site_id]', site_type = '$POST[site_type]', lat = '$_POST[lat]', long = '$_POST[long]', site_name = '$_POST[site_name]', tower = '$_POST[tower]', address = '$_POST[address]', city = '$_POST[city]', state = '$_POST[state]', zip = '$_POST[zip]', cluster = '$_POST[cluster]' WHERE gold_id = '$_POST[gold_id]'"; The table is set as long as varchar, same as lat, I thought at first it had something to do with the longitude being a negative number, but when I attempt to update it without using the negative number it still fails. I can update the field from phpMyadmin, but not from the script. As long as I take out the "long = '$_POST[long]'," line, it works fine. Quote Link to comment https://forums.phpfreaks.com/topic/53181-solved-update-longitude/ Share on other sites More sharing options...
tippy_102 Posted May 27, 2007 Share Posted May 27, 2007 "Long" is a reserved word: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html You should change it to something else. Quote Link to comment https://forums.phpfreaks.com/topic/53181-solved-update-longitude/#findComment-262726 Share on other sites More sharing options...
tekrscom Posted May 27, 2007 Author Share Posted May 27, 2007 Thank you very much, I'll check that from now on... never would of guessed that "long" was. Quote Link to comment https://forums.phpfreaks.com/topic/53181-solved-update-longitude/#findComment-262758 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.