Hi there everyone,

I have the following MySQL/PHP code:

$query = "SELECT DISTINCT property_name,board,standard,description,region,country,state,city,address,zip,fax,telephone,email,url,image,image_type FROM llm WHERE
 property_name LIKE '%$property_name%' OR country LIKE '%$property_name%' OR city LIKE '%$property_name%' ORDER BY property_name ASC LIMIT $offset, $item_perpage";
 
$querytotal = "SELECT count(DISTINCT property_name,board,standard,description,region,country,state,city,address,zip,fax,telephone,email,url,image,image_type) FROM llm WHERE
 property_name LIKE '%$property_name%' OR country LIKE '%$property_name%' OR city LIKE '%$property_name%' ORDER BY property_name ASC";

Which works great BUT there is 1 problem, I need to be able to pull the value ID from the database at the same time but WITHOUT it being a DISTINCT value, how can I do this?  All the others need to be DISTINCT apart from ID, i'm very confused.

Thanks for everything.

Regards

Chris Payne

www.planetoxygene.com

Reply via email to