PHP MySQL error in fetching array -
this question has answer here:
i have problem mysql_fetch_array() command. when enter page gives me warning :
"warning: mysql_fetch_array() expects parameter 1 resource, boolean given in g:\xampp\htdocs\bzs\modify.php on line 6"
here's code , can , what's problem?
<?php //index.php while ($events = mysql_fetch_array($resultevents)){ echo "title: <b>".$events['title']."</b><br>"; echo "detail: <b>".$events['detail']."</b><br>"; echo "added by: <b>".$username."</b><br>"; echo "<a href='modify.php?modify=$events['id']'> <span class='glyphicon glyphicon-edit'></span></a> ?> <?php //modify.php if(isset($_get['modify'])){ $idd = $_get['modify']; $res = mysql_query("select * eventcalendar id='$idd'"); /*line 6*/ $roww = mysql_fetch_array($res); } ?>
you $res false. have tried query:
select * database.table id='$idd'
btw, try give more descriptive names.
Comments
Post a Comment