Hi friends !!
my php code runnig nicely without any error in my local host but not running on server !!
it shows error where i use php’s mysqli_numrows(),mysqli_fetchrows() etc, it showing errors like this
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/maxdudes/public_html/gujaratraksha.in/index.php on line 127
Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /home/maxdudes/public_html/gujaratraksha.in/index.php on line 131
Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /home/maxdudes/public_html/gujaratraksha.in/index.php on line 136
my code is here
include_once("db_conx.php"); $xbt = "SELECT * from photo_upload"; $query1 = mysqli_query($con,$xbt); $rows = mysqli_num_rows($query1); $last_date = "SELECT SrNo,Upload_Date from photo_upload WHERE SrNo='$rows'"; $query_date = mysqli_query($con,$last_date); $last_inserted_date = mysqli_fetch_row($query_date); echo $last_inserted_date[1]; $sql = "SELECT Img_Location from photo_upload WHERE Upload_Date = '$last_inserted_date[1]'"; $query = mysqli_query($con,$sql); while($result = mysqli_fetch_row($query)){ echo ''; }