Current location: Hot Scripts Forums » Programming Languages » PHP » [HEP] Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in

[HEP] Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in

Reply
  #1 (permalink)  
Old
New Member
 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
[HEP] Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in

I want to make a site where users can store links in different categories,
for showing the links I made this script:

Code:
<?

$cat = killInjection($_REQUEST['cat']);
if ($cat=='') $cat = $parentRecord['parent'];
$per_page = 1;
$p=0;
if ($_REQUEST['p']!='') $p=killInjection($_REQUEST['p']);

$sql = "select * from tbl_product where status=0 and parent=".$cat." order by sort desc, date_added desc ".$per_page*$p.",".$per_page;
$result = @mysql_query($sql,$conn);
while($row=mysql_fetch_assoc($result)){
	
?>
<table align="center" border="0" width="98%" cellspacing="0" cellpadding="0">	
	<tr>
		<td valign="top" style="padding:10px">			
			<span style="color:#000000"><?=$row['detail']?></span>
		</td>
	</tr>	
</table>
<? }?>
When I try to open the page I get this as result

Code:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /public_html/module/product.php on line 11
so everything is working untill the second while() but I can't find the problem, can one of you help me with this problem?
Reply With Quote

Featured Marketplace Scripts (view more)

Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to mysql in include file when included in forums Forse PHP 2 07-12-04 07:39 PM
Supplied argument is not a valid MySQL result resource help aequo PHP 2 06-15-04 08:13 AM
why isnt this a valid mysql result resource mlbpa2 PHP 1 03-14-04 02:00 PM
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result ... hukka PHP 1 01-12-04 12:16 AM
wwwboard style board with modern functionality? complexprocess General HotScripts Site Discussion 11 09-03-03 03:15 AM


All times are GMT -5. The time now is 04:11 PM.
vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.