Bug #13220 Updated: Query problem with Unix billions

From: Date: Sun, 09 Sep 2001 11:58:31 +0000
Subject: Bug #13220 Updated: Query problem with Unix billions
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-65562@lists.php.net to get a copy of this message
ID: 13220 Updated by: derick Reported By: crimson@protonic.com Old Status: Open Status: Bogus Bug Type: MySQL related Operating System: FreeBSD PHP Version: 4.0.6 New Comment: Not a PHP bug, queries are executed in MySQL, and MySQL returns the results. Derick Previous Comments: ------------------------------------------------------------------------ [2001-09-09 07:52:16] crimson@protonic.com I'm honestly not sure if this is a PHP bug or a MySQL bug. I apologize if this is a waste of time. Here's an example script: $timenow = time(); $red = ($timenow-345600); $ticket_query = mysql_query("SELECT * FROM opentickets WHERE AskDate < $red"); This query returns all tickets where AskDate is earlier than the $red date, PLUS all tickets above 1 billion on the time stamp! Ack! I have resolved this by removing the single quotes from around '$red' in my query, so it reads: $ticket_query = mysql_query("SELECT * FROM opentickets WHERE AskDate < $red"); Just thought I would share this. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13220&edit=1

« previous php.dev (#65562) next »