Shoutbox

Mysql help - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Mysql help (/showthread.php?tid=27941)

Mysql help by stonesour on 06-30-2004 at 11:04 AM

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...
RE: Mysql help by WDZ on 06-30-2004 at 11:14 PM

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']){