![]() |
Error .. 1054 MYSQL .. Where Clause seems correct .. ideas?
This is a simple statement to draw some info on a home page regarding user stats .. right now the error i get is
Quote:
Code:
// forum stats start |
bump ..
|
[sql]SELECT userid, username FROM myprefix_user WHERE userid=2;[/sql]
|
ive seen the page before i was more hoping for somone to point out the error if it jumped out at them ..
I see the section you are pointing out, but how can i also set that syntax in this code. cause it seems the problem is at this section Code:
$headerguests=$db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "session WHERE userid=0 AND lastactivity>$datecut"); |
This is the same error as this thread ;
https://vborg.vbsupport.ru/showthread.php?t=119719 The broken line is this one ; PHP Code:
i.e. TABLE_PREFIX . "userid should be TABLE_PREFIX . "user.userid However, table prefix should not be used in WHERE clauses anyway, instead you should us an AS after the initial table selection, like this ; PHP Code:
PHP Code:
|
Paul, thanks this did help me also :)
|
Thank you for the help much appreciated.
|
All times are GMT. The time now is 01:28 AM. |
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:
|