Jump to content

Get Album Id, upon query with browser userid to match table user_id


danjapro

Recommended Posts

 

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;
	}

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. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.