![]() |
What's wrong with this query?
Can anyone point me to the right direction in what's wrong with the query below? The query is supposed to be in a plugin that displays the average age in forumhome (not mine), but it gives a database error:
[sql] SELECT ROUND(AVG(YEAR(NOW())-YEAR(birthday_search) - (MONTH(NOW()) < MONTH(birthday_search)) - (MONTH(NOW()) = MONTH(birthday_search) AND DAY(NOW()) < DAY(birthday_search)))) AS avgage FROM " . TABLE_PREFIX . " user WHERE YEAR(birthday_search)>0 [/sql] |
you simply have a space here: " . TABLE_PREFIX . " user ...<< between the " and user...
|
Thanks a lot. I'll try although I don't think this is the error cause in the database error I get, the table has the name it should have so the name is built correctly.
edit: Yep, I was correct, that didn't fix the problem :( |
It might help if you actually posted the error.
|
Woops sorry!
The error I get is: atabase error in vBulletin 3.5.0: Quote:
|
All times are GMT. The time now is 01:01 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|