RON_ron Posted September 14, 2010 Share Posted September 14, 2010 I need to get the 2nd code working. Please help. This works $query = "SELECT DISTINCT addressz FROM abs WHERE statez = 'AZ'"; $results = mysql_query($query); But this dosen't. $SomeVar = $_POST['disloc']; $query = "SELECT DISTINCT addressz FROM abs WHERE statez = '".$SomeVar."' ORDER BY addressz ASC"; $results = mysql_query($query); Link to comment https://forums.phpfreaks.com/topic/213367-error-in-a-single-line/ Share on other sites More sharing options...
the182guy Posted September 14, 2010 Share Posted September 14, 2010 You've already got a thread for this... it has been moved by a mod... http://www.phpfreaks.com/forums/index.php/topic,309973.0.html Anyway, the problem is whatever you're submitting in the form field 'disloc', it is not being matched to any records in the database. Link to comment https://forums.phpfreaks.com/topic/213367-error-in-a-single-line/#findComment-1110904 Share on other sites More sharing options...
RON_ron Posted September 14, 2010 Author Share Posted September 14, 2010 Typical asian answers! Thanks! Link to comment https://forums.phpfreaks.com/topic/213367-error-in-a-single-line/#findComment-1110921 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.