#11370 [Com]: Warning: Supplied argument is not a valid MySQL result resource in...line 16
| From: | a-pee700 at hotmail dot com | Date: | Tue, 20 Jul 2004 15:06:07 +0000 |
| Subject: | #11370 [Com]: Warning: Supplied argument is not a valid MySQL result resource in...line 16 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-62964@lists.php.net to get a copy of this message | ||
ID: 11370
Comment by: a-pee700 at hotmail dot com
Reported By: a dot naef at condor-communications dot com
Status: Bogus
Bug Type: MySQL related
Operating System: Windows 2000
PHP Version: 4.0.5
New Comment:
<a href=http://a--pee-pissing-news.da.ru>pee
a</a>
Previous Comments:
------------------------------------------------------------------------
[2001-06-09 01:40:59] sniper@php.net
works for me just fine. Check your permissions and also
try adding 'echo mysql_error();' lines after the mysql_db_query() and
you'll get more info what goes wrong
there. Most likely not enough permissions or the db name is wrong
or..Anyway, not a bug in PHP.
--Jani
------------------------------------------------------------------------
[2001-06-08 16:38:29] a dot naef at condor-communications dot com
<?php
$host = "localhost";
$user = "";
$pass = "";
$db = "andre";
$verbindung = mysql_connect($host, $user, $pass);
$sql = "SELECT name FROM test WHERE id='".$id."'";
$result = mysql_db_query($db,$sql);
while($row = mysql_fetch_array($result)) {
echo htmlentities($row["name"]);
}
mysql_close ($verbindung);
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=11370&edit=1