User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 402,027 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,491 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

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

Join Date: Oct 2005
Location: Philippines, Iligan City
Posts: 7
Reputation: omick16 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
omick16's Avatar
omick16 omick16 is offline Offline
Newbie Poster

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

  #16  
May 8th, 2007
Originally Posted by lexid2002 View Post
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


You forgot to setup a connection??? hehehe
Reply With Quote  
All times are GMT -4. The time now is 10:23 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC