[PHP-DB] php mysql calendar

2009-08-05 Thread nikos
Hello list Can someone suggest me a php mysql calender, easy configurable for special needs? I found some googling but the most of them query records form a specific table and its impossible to change the sql query. Thank you in advance Nikos

RE: [PHP-DB] newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column?

2009-08-05 Thread Ford, Mike
-Original Message- From: Govinda [mailto:govinda.webdnat...@gmail.com] Sent: 05 August 2009 01:41 Taking this: SELECT count(*) AS `CountUniqueDatesInMyTbl`, date(solarAWDateTime) AS `uniqueDate`, 'aweber_7solar_aw' AS `tableAlias` FROM aweber_7solar_aw GROUP BY

Re: [PHP-DB] newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column?

2009-08-05 Thread Govinda
Just one other tiny point of style here: having given the expression date(solarAWDateTime) the alias uniqueDate, you should probably use that alias to refer to the same thing elsewhere in your query, such as in the GROUP BY column. So: ... That's how I'd write it, anyway. I like to know

Re: [PHP-DB] newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column?

2009-08-05 Thread Govinda
Me/this again. this works good: $query = SELECT COUNT(*) AS `CountUniqueDatesInMyTbl`, date(solarLandingDateTime) AS `uniqueDate`, 't7solar_landing' AS `tableAlias` FROM t7solar_landing GROUP BY uniqueDate ORDER BY uniqueDate DESC LIMIT 62 UNION ALL SELECT count(*) AS

Re: [PHP-DB] newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column?

2009-08-05 Thread Ben Dunlap
except that I just added the ORDER BY clause onto each SELECT segment, and now I get this error: query failed: Incorrect usage of UNION and ORDER BY How can I order the results while still doing the UNION ALLs? You should only need one ORDER BY clause at the end of the whole query:

Re: [PHP-DB] newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column?

2009-08-05 Thread Chris
Ford, Mike wrote: -Original Message- From: Govinda [mailto:govinda.webdnat...@gmail.com] Sent: 05 August 2009 01:41 Taking this: SELECT count(*) AS `CountUniqueDatesInMyTbl`, date(solarAWDateTime) AS `uniqueDate`, 'aweber_7solar_aw' AS `tableAlias` FROM aweber_7solar_aw GROUP BY

Re: [PHP-DB] newbie: how to return one iteration *per unique date(DAY!)* in a timestamp column?

2009-08-05 Thread Ben Dunlap
Just one other tiny point of style here: having given the expression date(solarAWDateTime) the alias uniqueDate, you should probably use that alias to refer to the same thing elsewhere in your query, such as in the GROUP BY column. So: [8] That's a mysqlism :( It's not portable to other db's