Re: simple question abt convert to integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$id=(int)$_POST['txt'];
$query1="select * from patient where id=".$id."";
echo $query1;
$result1=mysql_query($query1);

echo $result1;
$num2=Mysql_num_rows($result1);
$num3=Mysql_num_fields($result1);

still it has previous error

Here is my output:select * from patient where id=1
*Warning*: mysql_num_rows() expects parameter 1 to be resource, boolean
given in

*Warning*: mysql_num_fields() expects parameter 1 to be resource, boolean
given in **

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux