Re: simple question abt convert to integer
| From: | Negin Nickparsa | Date: | Wed, 25 May 2011 04:27:18 +0000 |
| Subject: | Re: simple question abt convert to integer | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313139@lists.php.net to get a copy of this message | ||
$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 **