![]() |
How can i exclude a styleid from this?
$allstyles=$DB_site->query("SELECT style.title, user.styleid, COUNT(*) AS count FROM user LEFT JOIN style USING (styleid) WHERE style.styleid IS NOT NULL AND style.userselect=1 GROUP BY user.styleid");
$dropdownbits=''; while ($thisstyle=$DB_site->fetch_array($allstyles)) { if ($styleid==$thisstyle[styleid]) { $stylesel='selected'; } else { $stylesel=''; } eval("\$dropdownbits .= \"".gettemplate('forumhome_dropdownbit')."\";") ; } I want to make it so styleid=X is not shown in the menu, no point posting in the appropriate thread as firefly is far too busy to reply and normally no one replies...it's just a quick question for someone with experience in PHP/SQL. |
PHP Code:
|
SO is the <> sign in sql the equivalent of != in PHP?
- miSt |
<> and != is equivalent in php and in sql, so you can also use <> in php and also != in sql :)
|
Oh i see - that's quite cool then *one to remember* ;)
Thanks - miSt |
Thanks Xenon!
|
you're both welcome :)
|
All times are GMT. The time now is 06:24 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:
|