function GetVideoInfo( $video_id, $user_id )
{
$result = mysql_query("SELECT * FROM `mytable`
WHERE
video_id = '$video_id'
AND
user_id = '$user_id'")
or die( mysql_error() );
return mysql_fetch_array( $result );
}
$videoRecepients = $viddler_custom->GetVideoRecepients( $video_details['id'] );
echo "<pre>";
print_r($videoRecepients);
echo "</pre>"
When I try using print_r, it only results a single row in the table. My expected result should have 2 results. I am 100% sure that my query is correct, so that is not the problem. I’m thinking that maybe it’s on my mysql_fetch_array that is wrong.
Your help would be greatly appreciated and rewarded! Thanks! 🙂
From the example on the manual page,
mysql_fetch_arrayreturns the information on the current pointer of the $result object. This will mean you want to loop through the result until you’ve fetched everything.