note 106486 added to function.mysql-num-rows
| From: | ivanchauma at gmail dot com | Date: | Sun, 13 Nov 2011 19:41:57 +0000 |
| Subject: | note 106486 added to function.mysql-num-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184417@lists.php.net to get a copy of this message | ||
i have a problem using :
mysql_connect($hostname, $username, '') or die ("Database CONNECT Error (line
18)");
mysql_select_db("ITC1");
$result = mysql_query("SELECT * FROM pauta where user=".$_SESSION['user']);
if (mysql_num_rows($result)) {
while ($qry = mysql_fetch_array($result)) {
echo "
<table border='1' width='100%' cellspacing='0'
cellpadding='0'>
<tr>
<td width='16%'>$qryy[Nome]</td>
<td width='8%'>$qry[Portugues]</td>
<td width='9%'>$qry[RI]</td>
<td width='9%'>$qry[Matematica]</td>
<td width='7%'>$qry[SD]</td>
<td width='8%'>$qry[Hardware]</td>
<td width='3%'>$qry[LTP]</td>
<td width='11%'>$qry[PP]</td>
<td width='8%'>$qry[PH]</td>
<td width='10%'>$qry[media]</td>
<td width='10%'>$qry[falta]</td>
</tr>
</table>
";
i have got this error :
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in
C:\xampp\htdocs\33\Test.php on line 76
----
Server IP: 69.147.83.197
Probable Submitter: 41.220.36.65
----
Manual Page -- http://www.php.net/manual/en/function.mysql-num-rows.php
Edit -- https://master.php.net/note/edit/106486
Del: integrated -- https://master.php.net/note/delete/106486/integrated
Del: useless -- https://master.php.net/note/delete/106486/useless
Del: bad code -- https://master.php.net/note/delete/106486/bad+code
Del: spam -- https://master.php.net/note/delete/106486/spam
Del: non-english -- https://master.php.net/note/delete/106486/non-english
Del: in docs -- https://master.php.net/note/delete/106486/in+docs
Del: other reasons-- https://master.php.net/note/delete/106486
Reject -- https://master.php.net/note/reject/106486
Search -- https://master.php.net/manage/user-notes.php