Monday, 9 September 2013

what is wrong with this.. php codes

what is wrong with this.. php codes

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean
given in C:\xampp\htdocs\gallery\index.php on line 17
here is my code:
<?php
$query = mysql_query("SELECT 'id', 'name' FROM 'albums'");
while($run = mysql_fetch_array($query)){ /THIS IS MY LINE 17
$album_id = $run['id'];
$album_name = $run['name'];
$queryl = mysql_query("SELECT 'url' FROM 'photos' WHERE
'album_id'='$album_id'");
$runl = mysql_fetch_array($queryl);
$pic = $runl['url'];
?>

No comments:

Post a Comment