The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
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] |
#2
|
|||
|
|||
![]()
you simply have a space here: " . TABLE_PREFIX . " user ...<< between the " and user...
|
#3
|
|||
|
|||
![]()
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 ![]() |
#4
|
||||
|
||||
![]()
It might help if you actually posted the error.
|
#5
|
|||
|
|||
![]()
Woops sorry!
The error I get is: atabase error in vBulletin 3.5.0: Quote:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|