lordphate Posted May 20, 2007 Share Posted May 20, 2007 $clb_id = $_GET["clb_id"]; $query = "SELECT id FROM flashchat_rooms WHERE cld_id=".$clb_id; IF( $clb_id == "0" ) { $chatroom = '1'; } else { $chatroom = $query->single; } Does not work. so i break it up $clb_id echo's fine $query echo's fine $chatroom Does NOT echo fine. So i'm left to wonder if i could just do $chatroom = mysql_query($query); echo'd again, still a no go. So i smarten up right? I go through the other code to find what the other programmers did... $this->getUserInfo = new Statement("SELECT * FROM members AS m,profiles AS p WHERE m.mem_id = p.mem_id AND m.mem_id=? LIMIT 1"); and i'm like "how's this help me" So i look further to see how they connected.. function getUserProfile($userid) { $rs = $this->getUserInfo->process($userid); if(($rec = $rs->next()) == null) return null; include(DOC_ROOT."/themes/".THEME."/modules/profiles.inc.php"); return $profiles["url"]."/".$rec["folder"]; } Any ideas?! Link to comment https://forums.phpfreaks.com/topic/52175-smarty-controls/ Share on other sites More sharing options...
chigley Posted May 20, 2007 Share Posted May 20, 2007 You need to execute your query, using mysql_query() and then you need to fetch the results from it, eg mysql_fetch_assoc() Link to comment https://forums.phpfreaks.com/topic/52175-smarty-controls/#findComment-257431 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.