Link in php and mysql -
Link in php and mysql -
this question has reply here:
mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row() expects parameter 1 resource or mysqli_result, boolean given 32 answersi load info mysql database , display listview jqm. here code:
<?php include "connect.php"; $result = mysqli_query($con,"select * story"); id==$row['id']; echo "<ul data-role='listview' data-inline='true'>"; while($row = mysqli_fetch_array($result)) { echo "<li>" ; echo "<a href='view.php?id=".$rows['id']."' data-rel='external'>"; echo $row['name']; echo "</a>"; echo "</li>"; } echo "</ul>"; ?>
and view page :
<?php include "connect.php"; $id = $_get['id']; $result = mysqli_query($con,"select * story id='".$id."'"); $row = mysqli_fetch_array($result); echo $row['content']; ?>
but not working , error: warning: mysqli_fetch_array() expects parameter 1 mysqli_result, boolean given in c:\xampp\htdocs\1\view.php on line 11. should ?
this error shows sql query unable info $result , if seek print result on screen show bool(false) output. parameter when passed mysqli_fetch_array() not fetch array because requires true boolean value.
first seek info database $result, print , proceed forward.
maybe help,
$result = mysqli_query($con,"select * story id='.$id.' ");
remember utilize error checking methods die, mysqli_error, mysqli_connect_error(), mysqli_connect_errno() etc improve debugging.
php mysql
Comments
Post a Comment