EXTRACT() not working on phpMyAdmin

p. I was looking at the MySQL manual for “Date and Time functions”:http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html and stumbled upon a function that I might need for an “experiment” I’m doing. I used the function EXTRACT in my query, having my test run on “phpMyAdmin”:http://phpmyadmin.net, but it was giving me a syntax error warning. I thought that I might have the wrong syntax for EXTRACT so I tried running a sample query, right straight from the manual.

[mysql]SELECT EXTRACT(YEAR FROM ‘1999-07-02’);[/mysql]

p. But it still gave me the same error warning. It should be working since its, after all, it was in the manual… otherwise it would be corrected or removed. I ran the same query, but this time the mysql command line. It worked. I executed the query in PHP, it also worked. Well, I think phpMyAdmin is having some problems with this. I’m using phpMyAdmin – 2.8.1, on MySQL 5.0.21 that comes with “XAMPP”:http://www.apachefriends.org/en/xampp.html . Maybe I’ll try to ask somebody to test it in other versions.

 

Comments: 1

Leave a reply »

 
 
 

aahh you’re still at it. me, too. *click blog*

 

Leave a Reply

 
(will not be published)
 
 
Comment
 
 

 

Resources