What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Mysql help

Mysql help
Author: Message:
stonesour
Full Member
***

Avatar
Posts: 901231

Posts: 205
35 / Male / –
Joined: Nov 2003
O.P. Mysql help
Does anyone know what the query would be to search the mem_name column in a table and then check every entry returned and check it against a value?

I'm using
code:

$banned_list = $DB->query("SELECT * FROM ibf_toplist_banned");
$banned_total = $DB->get_num_rows($banned_list);
while($banned = $DB->fetch_row()) {
if ($ibforums->member['name'] == $banned){
$this->problem('toplist_off','not_on','turned_off');
}
}

And yes those are real queries and all that it's just in invision power board slang. But it won't output the $this-> problem bit but it should.
If I put
code:
if ($ibforums->member['name'] == 'My user name')

It works...
06-30-2004 11:04 AM
Profile E-Mail PM Web Find Quote Report
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: Mysql help
quote:
Originally posted by stonesour
if ($ibforums->member['name'] == $banned){
It looks like $ibforums->member['name'] is a string and $banned is an array. You need to do something like this...
code:
if ($ibforums->member['name'] == $banned['mem_name']){
06-30-2004 11:14 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On