$video = mysql_query("SELECT vid FROM fav WHERE uid = ". $loggedInUser->user_id ."");
$result = mysql_query("SELECT * FROM tab WHERE ID = ". $video ."");
if (!$result)
die("mySQL error: ". mysql_error());
while($row = mysql_fetch_object($result));
echo ",$row->ID,";
mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
I think the code speaks for itself, but I don´t get it, how to solve this. What did I do wrong? I only want to get the video id (vid) where the user id (uid) equals $loggedInUser->user_id.