Jeanco
12-22-2003, 03:21 AM
Hello, please take a look at the code below and let me know if you see something I'm doing wrong. I'm just learning PHP but judging by whats in the book I can't see anything wrong. The connection to the DB has already been made so tahts not it...
<?php /* Start PRODUCT OF THE MOMENT code */
$result = mysql_query('SELECT * FROM products WHERE ID = 2');
while ($row = mysql_fetch_array($result)) {
echo "<b>{$row['TITLE']}</b> <br>" .
"{$row['SHORT_D']} ...<a href=\"content.php?content={$row['LONG_D']}\">more</a>";
}
?>
I get the following error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/epasture/public_html/index.php on line 116
Thanks for helping a newbie guys
<?php /* Start PRODUCT OF THE MOMENT code */
$result = mysql_query('SELECT * FROM products WHERE ID = 2');
while ($row = mysql_fetch_array($result)) {
echo "<b>{$row['TITLE']}</b> <br>" .
"{$row['SHORT_D']} ...<a href=\"content.php?content={$row['LONG_D']}\">more</a>";
}
?>
I get the following error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/epasture/public_html/index.php on line 116
Thanks for helping a newbie guys
