got this query thats not working out and dont know why can anyone see anything wrong?
thanx guys
EDIT. this error is comming up becuase the first time i go to the page nothing is selected. once i select something i get this error now
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Apache2\htdocs\survey\users.php on line 78
Unknown column 'IT' in 'where clause'
Code: Select all
<?php
include("conection.php");
$e_dept = $_POSTї"select_dept"];
$query = "select * from tbl_emp WHERE e_dept=$e_dept";
$result = mysql_query($query);
$num_results = mysql_num_rows($result) or die (mysql_error());
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
$e_first = $rowї'e_first'];
?>