danjapro Posted March 3, 2011 Share Posted March 3, 2011 There is something wrong with my statement it is not returning sql queries results based on matching the url based based userid to match with the table user_id and get the Ablum id and Album name: Please hlep: if(isset($_GET['userid'])) { $db =& JFactory::getDBO(); $user =& JFactory::getUser(); $id = $user->id; $album_id = $_GET['userid']; $query = 'SELECT user_id, id, format_id, year, name FROM #__muscol_albums WHERE user_id = ' . $album_id; //$query = 'SELECT user_id FROM #__muscol_albums WHERE id = ' . $album_id ; $result = mysql_query($query) or die('Error, No Album Search failed'); list($name, $user_id, $id, $year) = mysql_fetch_array($result); echo $id; //exit; } Link to comment https://forums.phpfreaks.com/topic/229534-get-album-id-upon-query-with-browser-userid-to-match-table-user_id/ Share on other sites More sharing options...
cunoodle2 Posted March 3, 2011 Share Posted March 3, 2011 Please read the rules. No need to start multiple threads for the same thing. You have this other thread with the exact same issues/code.. http://www.phpfreaks.com/forums/index.php?topic=326163.0 Mods, please lock and one and consolidate. Link to comment https://forums.phpfreaks.com/topic/229534-get-album-id-upon-query-with-browser-userid-to-match-table-user_id/#findComment-1182579 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.