Probs with mysql_db_query and mysql_result
| From: | Dirk Schmidt | Date: | Thu, 30 Sep 1999 11:04:43 +0000 |
| Subject: | Probs with mysql_db_query and mysql_result | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-5024@lists.php.net to get a copy of this message | ||
Hello list,
I have a Problem with mysql_db_query and mysql_result. The mysql_db_query
in the following Code
does only work, if i delete the third parameter ($ConnID). Otherwise i get
a 'Document contains no
data' - Error in the browser.
$ConnID = mysql_pconnect("localhost", "root", "password");
$Rs = mysql_db_query("database", "select * from DateiTypen", $ConnID);
without a connection-ID it seems to work:
$ConnID = mysql_pconnect("localhost", "root", "password");
echo $ConnID . " ";
$Rs = mysql_db_query("database", "select * from DateiTypen");
echo $Rs;
this gives 'Resource id #1 Resource id #2' as Output.
But I can't get a value out of the ResultSet then. The following Code gives
a 'Document contains
no Data' - Error again:
$Value = mysql_result($Rs, 0, "Beschreibung");
echo $Values;
Environment: Solaris 7, Apache 1.3.6, php40b3-dev. The same Code works
without problems on
Linux/Apache 1.3.6/php40b2 against the same mysql-Server.
Please help,
thanks a lot,
Dirk