Jump to content

Error in a single line???


RON_ron

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.