I have an error in my mysql statement and i am not able to understand whats wrong with it. I am getting following warning
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\website-template-40\website-template-40\employed.php on line 166 and after using mysql_error
i got following error:- what a error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where designation='employed'' at line 1
<?php
$q="select count(*) \"total\" from tblregistration where designation='employed'";
$ros=mysql_query($q) or die('error1'.mysql_error());
$row=(mysql_fetch_array($ros));
$total=$row['total'];
$dis=8;
$total_page=ceil($total/$dis);
$page_cur=(isset($_GET['page']))?$_GET['page']:1;
$k=($page_cur-1)*$dis;
$q11="select * from tblregistration limit $k,$dis where designation='employed'";
$ros1=mysql_query($q11) or die('what a error'.mysql_error());
$i=2;
while($row1=mysql_fetch_array($ros1))
{
if($i==2)
{
echo '<tr>';
$i=0;
}
?> <td><img src="upload/<?php echo $row1['image'];?>" width="100px" height="100px;" /></td>
<td><?php echo $row1['name'];?><br />
<?php echo $row1['designation'];?><br />
<?php echo $row1['contactno'];?><br />
<?php echo $row1['emailid'];?><br />
</td>
<?php
$i++;
if($i==2)
{
echo '</tr>';
}
} ?>