RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource

Join Date: Apr 2007
Posts: 1
Reputation: lexid2002 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
lexid2002 lexid2002 is offline Offline
Newbie Poster

Re: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource

  #8  
Apr 29th, 2007
I have this problem and i am new so please go slow...

error on page

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/loyalist/public_html/shop/pages/0.php on line 17

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/loyalist/public_html/shop/pages/0.php on line 13

--------

<?php
//
// TYPES:
//
// CDS DVDS CLOTHING KEYRINGS/BOTTLEOPENERS FLAGS OFFERS TICKETS
//
// 1 2 3 4 5 6 7
//
$query = "SELECT * FROM config WHERE id=3";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
$query = "SELECT * FROM items WHERE id=".$row['value']." ORDER BY id DESC Limit 0,1";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
$id = $row['id'];
$name = $row['name'];
$desc = $row['description'];
$price = $row['price'];
$img = $row['img'];
$menu = $row['menu'];
$frase = $desc;
$char = 180;
$desc = checklenght($frase, $char);

$content = $namet.$name.$desct.$desc.$pricet.'£'.$price;

?>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" rowspan="2" class="image" align="center"><a href="#" onclick="window.open('info.php?id=<?php print $id ?>&menu=<?php print $menu; ?>', '_info', 'HEIGHT=500,resizable=no,WIDTH=430,scrollbars=1');"><img src="images/item_enlarge.gif" border="0" /></a><br/><br/><img src="products/<?php print $img; ?>" width="95" height="95" border="0" /></td>
<td valign="top" class="item-main"><b><?php print $content; ?></b></td>
</tr>
<tr>
<td valign="top"><img src="images/item_order1.gif" border="0" /><a href="#" onclick="window.open('info.php?id=<?php print $id ?>&menu=<?php print $menu; ?>', '_info', 'HEIGHT=500,resizable=no,WIDTH=430,scrollbars=1');"><img src="images/item_order2.gif" border="0" /></a></td>
</tr>
</table>
<br />
<?php
}
}
?>
<b>Welcome...</b></span>
<br />
<br />
<span style="font-size: 14px; ">
<?php
$query = "SELECT * FROM config WHERE id=1";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
$introtext = $row['value'];
$introtext = nl2br($introtext);
print $introtext;
?>
</span></b>


hope someone can help

lexi
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:35 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC