Home Community Mys-Script Creative Off-Topic |
|
|
|
04-05-2012 10:59 AM | |||
|
|||
I couldn't find this in mine. I copied all the surrounding code around it and pasted it here.
The following is on lines 12-24 function usernametouid($name){ $stmt = $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}users WHERE username='{$name}'"); $row = $stmt->fetch(PDO::FETCH_ASSOC); return $row['uid']; } function getonlinestatus($name) { $stmt = $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}online WHERE username='{$name}'"); $row = $stmt->fetch(PDO::FETCH_ASSOC); if(is_array($row)) $onlinestatus = "<img src='templates/icons/user_offline.gif'>"; else $onlinestatus = "<img src='templates/icons/user_online.gif'>"; return $onlinestatus; |
04-06-2012 08:29 AM | |||
|
|||
Oh my goodness, sorry about that I changed arrays to objects in my scripts. In your case, just change if(is_array($row)) to if(!is_array($row)) and it should work flawlessly.
|
What's New? |
What's Hot? |
What's Popular? |