Hi i am retrieving data from database in php when i retrieve vale i am getting following warning
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
here is my code
<?php
session_start();
require_once("configure.php");
if (!(isset($_GET['pagenum']))) {
$pagenum = 1;
} else {
$pagenum = $_GET['pagenum'];
}
$page_limit = ($_GET["show"] <> "" && is_numeric($_GET["show"]) ) ? $_GET["show"] : 5;
$eid=$_SESSION['eid'];
$sql="SELECT * FROM `clientreg` WHERE eid=$eid and nextcalling=curdate()";
$cnt = mysql_num_rows( mysql_query($sql));
$last = ceil($cnt/$page_limit);
if ($pagenum < 1) {
$pagenum = 1;
} elseif ($pagenum > $last) {
$pagenum = $last;
}
$lower_limit = ($pagenum - 1) * $page_limit;
$sql2 = $sql . " limit ". ($lower_limit)." , ". ($page_limit). " ";
$rs = mysql_query($sql2);
while ( $row = mysql_fetch_array($rs) ) {
echo $row["mobile"];
}
?>
i am getting this warning when nextcallingdate is'0000-00-00' in database aur any other date expect current date
How can i achieve my goal how can i handling this warning
Any help will be appreciated