The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
= works fine but != messed up the query?
this is the query
PHP Code:
|
#2
|
||||
|
||||
PHP is fine with it, but SQL prefers NOT (iirc)
|
#3
|
|||
|
|||
Try "<>" instead of "!="
Lol a lot of different answers IIRC "<>" is the official SQL notation, "!=" is added later i think (MySQL only???, what version??). But what happens, you get an error, it don't function like expected? |
#4
|
||||
|
||||
Quote:
the table looks like this Code:
groupid userid username join_date mod_queue 7 10 sabret00the 1106842883 1 7 64 user2 1106661929 NULL Quote:
|
#5
|
|||
|
|||
Are you 100% sure that $groupid contain "7"?
What are the fieldtypes? Are these userid's in the user table? PS you could try running it without the test on mod_queue to find where the error is. Edit try changing that NULL value to 0. |
#6
|
||||
|
||||
groupid is definately 7
fieldtypes, oh mod_queue is set at tinyint(4) the userid's are in the grps_user table it works without the mod_queue clause, it's just that that's causing the problem? even with NULL set as 0 it don't work? |
#7
|
||||
|
||||
Change this:
PHP Code:
PHP Code:
|
#8
|
||||
|
||||
Code:
SELECT grps_user.groupid,grps_user.userid, user.username, grps_user.join_date,grps_user.mod_queue FROM grps_user LEFT JOIN user ON (user.userid = grps_user.userid) WHERE grps_user.groupid = 7 AND grps_user.mod_queue != 1 ORDER BY grps_user.join_date DESC |
#9
|
||||
|
||||
Ok we have some issues with your database model here. You have some data redundancy in the fact you have the username column in this grps_user table. Drop that column as you can get the users username via a join on the userid column. Also change the fieldtype of the mod_queue column to smallint, lenth 1, unsigned and default 0. Then try your query :up:
|
#10
|
||||
|
||||
oops, that username was never apart of the grps_user column
here's the table straight from phpmyadmin Code:
recordid groupid userid join_date mod_queue Edit Delete 4 3 10 1102848936 NULL Edit Delete 3 2 10 1102848632 NULL Edit Delete 13 6 10 1106781470 NULL Edit Delete 12 3 64 1106777848 NULL Edit Delete 9 2 64 1106568571 NULL Edit Delete 10 7 64 1106661929 NULL Edit Delete 14 6 64 1106781499 0 Edit Delete 16 7 10 1106842883 1 i'm gonna try and delete it and reinstall it, as i have no idea why it won't work still. works fine now changed it to in_mod_queue just to be safe and it's working fine. thank you everyone, sorry to waste your time. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|