AAAAGGGHHHH!!! Help!!

From: Date: Fri, 11 Jul 2003 20:41:06 +0000
Subject: AAAAGGGHHHH!!! Help!!
Groups: php.general 
Request: Send a blank email to php-general+get-154930@lists.php.net to get a copy of this message
I am running a query in mysql : SELECT DISTINCT (id) AS visitor_id, MAX(date_time) AS last, MIN(date_time) AS first, UNIX_TIMESTAMP( MAX(date_time)) - UNIX_TIMESTAMP( MIN(date_time)) AS diff FROM visitors, pixeldata_ WHERE visitors.created > DATE_SUB( CURRENT_DATE, INTERVAL 1 HOUR ) AND id = pixeldata_.remote GROUP BY visitors.id The idea behind the WHERE clause is to only get results from the last hour. I have used this construct successfully in dozens of other queries. However, the results here are giving me every single visitor in the table. Regardless of when created. In other words that part of the WHERE clause is not working. Does anybody see any problem in the sql that I'm not seeing?? This is driving me nuts. Mike

« previous php.general (#154930) next »