Trouble with "date" column
| From: | Nally, Tyler G. | Date: | Tue, 08 Jan 2002 18:30:07 +0000 |
| Subject: | Trouble with "date" column | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-15540@lists.php.net to get a copy of this message | ||
Hello,
My boss is going through the mysql.com tutorials starting at ...
http://www.mysql.com/articles/ddws/12.html
... and currently stuck at ...
http://www.mysql.com/articles/ddws/13.html
The boss is using phpMyAdmin to access the database, and everything
has been working just fine.... until it gets to a database query
where it's using a "date" column (JokeDate) in the where clause.
The query is shown below and the phpMyAdmin error is
also shown...
SELECT COUNT(*) FROM Jokes
WHERE JokeDate >= "2000-01-01"
MySQL said:
Lost connection to MySQL server during query
The database table is defined thusly:
CREATE TABLE Jokes (
ID int(11) DEFAULT '0' NOT NULL auto_increment,
JokeText text,
JokeDate date DEFAULT '0000-00-00' NOT NULL,
PRIMARY KEY (ID)
);
With three rows of information in it.
Even if I change the query to :
select * from Jokes where JokeDate >= "2001-01-01"
-or-
select * from Jokes where JokeDate >= '2001-01-01'
-or even-
select ID, JokeText, JokeDate from Jokes where JokeDate >= '2001-01=01'
... it just doesn't work and it returns the "Lost Connection" error.
If I select on a different column (like ID or JokeText) it works just
fine.
The MySQL database is 3.22.26a running on a Solaris through iPlanet
webserver on a test machine/database and Apache on production
machine/database.
Any help. Thanks in advance.
--
__ _ Tyler Nally
/ /__ ____ _(_)___ ____ ____ _________ _ tnally@legion.org
/ / _ \/ __
/ / __ \/ __ \ / __ \/ ___/ __ / 317-860-3016
/ / __/ /_/ / / /_/ / / / // /_/ / / / /_/ / American Legion Website
/_/\___/\__, /_/\____/_/ /_(_)____/_/ \__, / http://www.legion.org
/____/ /____/