![]() |
= works fine but != messed up the query?
this is the query
PHP Code:
|
PHP is fine with it, but SQL prefers NOT (iirc)
|
Try "<>" instead of "!=" ;)
Lol a lot of different answers :D 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? |
Quote:
the table looks like this Code:
groupid userid username join_date mod_queue Quote:
|
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. |
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? |
Change this:
PHP Code:
PHP Code:
|
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 |
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:
|
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 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. |
All times are GMT. The time now is 02:33 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:
|