Weird Distinct bug?

From: Date: Fri, 24 May 2002 10:27:32 +0000
Subject: Weird Distinct bug?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19411@lists.php.net to get a copy of this message
Hi there everyone, On my linux server I am using: MySQL 3.22.32 Whereas on my Local server I am using MySQL 3.23.42 (Or 43.don't remember). Anyway, I am having a wierd but major problem, if I do the code like the following locally it WORKS, if I do it on the server with the slightly old MySQL it says there is an error, is this because it's not supported in that version or does it need formatting slightly different? $query = "SELECT * FROM llm WHERE property_name LIKE '%$property_name%' OR country LIKE '%$property_name%' OR city LIKE '%$property_name%' GROUP BY property_name ORDER BY property_name ASC LIMIT $offset, $item_perpage"; $querytotal = "SELECT count(DISTINCT property_name) FROM llm WHERE property_name LIKE '%$property_name%' OR country LIKE '%$property_name%' OR city LIKE '%$property_name%' ORDER BY property_name ASC"; The problem lies within SELECT COUNT (DISTINCT property_name) - locally, no problem, works like a charm, but if I do it on the server it just says I have an error in my statement and if I take out DISTINCT the error goes away, it just then doesn't do what it needs to :-( Any ideas? I don't know how to upgrade the MySQL on my server so I hope there's another way around it :-( Chris

« previous php.db (#19411) next »