#10456 [Com]: Warning: Supplied argument is not a valid MySQL result resource in c:\inetpub\w
| From: | live-sex1127 at hotmail dot com | Date: | Tue, 20 Jul 2004 15:01:26 +0000 |
| Subject: | #10456 [Com]: Warning: Supplied argument is not a valid MySQL result resource in c:\inetpub\w | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-62808@lists.php.net to get a copy of this message | ||
ID: 10456
Comment by: live-sex1127 at hotmail dot com
Reported By: joris_van_boven at hotmail dot com
Status: Bogus
Bug Type: MySQL related
Operating System: win 2000
PHP Version: 4.0.4pl1
New Comment:
<a href=http://success-self-bbw-bl.da.ru>live
sex</a>
Previous Comments:
------------------------------------------------------------------------
[2001-04-23 07:47:28] derick@php.net
RTFM:
mysql_connect ("localhost"," user", "pw");
$query = "SELECT * from blaat";
mysql_select_db ("db1");
$r = mysql_query ($query);
while ($s = mysql_fetch_row($r))
{
/* Do Stuff */
}
------------------------------------------------------------------------
[2001-04-23 07:39:42] joris_van_boven at hotmail dot com
<html><body>
<h1>Kijk hier een database!</h1>
<a href='Prob01.PHP'>Prob 01 (PHP)</a>
<?
$SQLhost = "localhost";
$SQLgebruiker = "Administrator";
$SQLpassword = "xxxxxxxxx";
// connect
database-------------------------------------------------------------------------------------------------
@$objconn = mysql_connect($SQLhost,$SQLgebruiker,$SQLpassword)
or die("Da is hier mis gelopen! Kan niet inloggen op de database:
".$SQLhost." ".$SQLgebruiker." ".$SQLpassword );
// Basis
SQL-string-------------------------------------------------------------------------------------------------
$Sqlstring = "SELECT id, naam, com FROM prob";
// Ophalen data en in tabel
steken----------------------------------------------------------------------------------
echo "<table
border=1><TR><TH>ID</TH><TH>Persoon</TH><TH>Commentaar</TH></TR>";
$dbRecordSet = mysql_db_query($SQLgebruiker, $Sqlstring);
while ($dbRecord = mysql_fetch_array($dbRecordSet))
{
echo
"<TR><TD>".$dbRecord[id]."</TD><TD>".$dbRecord[naam]."</TD><TD>".$dbRecord[com]."</TD></TR>";
}
echo "</table>";
// Sluiten
database--------------------------------------------------------------------------------------------------
$dbRecord=null;
mysql_close($objconn);
$objconn=null;
?>
</body></html>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=10456&edit=1