Hi,
I am new to PHP Development. I am retrieving data from my database table clf_email. I am having a mysql_num_rows error in results. I cannot understand where i am going wrong and what error i am doing in the code. Please help in removing this error.
<?php
require_once("../db.php");
$id = $_GET['emailID'];
$query = "SELECT * FROM `clf_email` WHERE emailID ='".$id."'";
$result =mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query);
$sql = "DELETE FROM $t_email WHERE emailID = $id";
$result = mysql_query($sql);
?>
<table width="943" border="1" cellpadding="0" cellspacing="0" id="email_tbl">
<?php if(mysql_num_rows($result) < 1){
echo "<div align='center' class='err'><b>There is no data available in the database!</b></div>";
}else {
//echo "<div class='flag'><b>Database is searched and the data you asked is given below!</b></div>";
while( $row = mysql_fetch_array($result)){
?>
<tr>
<td width="110" id="email"><a href="<?php echo $row['email']; ?>" class="email_link"><?php echo $row['email']; ?></a></td>
<td width="417" id="email_txt"><?php echo $row['message']; ?></td>
<td width="115" id="email_txt"><?php echo $row['date']; ?></td>
</tr>
<?php } } }; ?>