Closed (fixed)
Project:
Birthdays
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2007 at 08:56 UTC
Updated:
16 Oct 2007 at 07:56 UTC
The module uses function DAY() in SQL, but this function available only on MySQL >= 4.1.1. On earlier MySQL same work doing by DAYOFMONTH(). I think need to write in README about requirements: module will works on MySQL 4.1.1 or higher or replace DAY with DAYOFMONTH in all queries.
On older MySQL errors appeared like:
user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(birthday) as d, month(birthday) as m, query: SELECT day(birthday) as d, month(birthday) as m, year(birthday) as y, DATE_FORMAT( NOW( ) , '%Y' ) - DATE_FORMAT( birthday, '%Y' ) - ( DATE_FORMAT( NOW( ) , '%m%d' ) < DATE_FORMAT( birthday, '%m%d' ) ) AS age FROM dob WHERE uid = '1' LIMIT 1 in velo.chepetsk.ru/www/includes/database.mysql.inc on line 167.
This bug firstly reported by jerboa7 in Russian community: http://drupal.ru/node/8557
Comments
Comment #1
axel commentedSorry for disinformation. Problem probably was exists in older versions of module, but in code of 5.x-1.x-dev I not found these queries with DAY(). Issue closed.
Thanx for useful module :)