R u sure your printing out the correct array (hash) field? Did you connect
to the db? Is mysql_error reporting an error?


DVP
----
Dathan Vance Pattishall     http://www.friendster.com


> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of T. H. Grejc
> Sent: Sunday, May 16, 2004 11:36 AM
> To: [EMAIL PROTECTED]
> Subject: Select distinct year from unix timestamp
> 
> Hello,
> 
> I'm trying to select all distinct years from a unixtimestamp field in
> MySQL database (3.23.56). I have a query:
> 
> SELECT DISTINCT YEAR(date_field) As theYear FROM table
> 
> but PHP gives me an empty array. What am I doing wrong?
> 
> TNX
> 
> 
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to