RE: [PHP-DB] Resource id #2
| From: | Rick Emery | Date: | Mon, 29 Oct 2001 14:43:14 +0000 |
| Subject: | RE: [PHP-DB] Resource id #2 | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-13811@lists.php.net to get a copy of this message | ||
Change code as follows:
<?
$msgcre = "SELECT msg FROM creators WHERE id='0'";
$result = mysql_query($msgcre);
$row = mysql_fetch_array($result);
echo "<FONT color='#000000' style='font-size: 10pt; font-weight:
bold'>".$row['msg']."</font>";
?>
-----Original Message-----
From: Andrew Duck [mailto:necro@exclusionzone.com]
Sent: Sunday, October 28, 2001 7:00 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Resource id #2
I am trying to select a message from a table in a database. the message will
will be in column 'msg' and will be in same row as id='0'.
I need that msg put to the screen. With the code below I get the error:
Resource id #2
Can someone please explain how I can fix this..
Thankyou in advance.
<?
$msgcre = "SELECT msg FROM creators WHERE id='0'";
$msg = mysql_query($msgcre);
echo "<FONT color='#000000' style='font-size: 10pt; font-weight:
bold'>$msg</font>";
?>