Webmastersite.net
Register Log In

RSS - mysql_num_rows error

Comments on RSS - mysql_num_rows error

david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Aug 08, 2005 - 9:51 PM:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in classes/database.php on line 108

I get that at anmlmdirectory.com/index.ph...?action=displaycat&catid=9

Try to see the right rss feed.

This is what's around line 108 in database.php :

function numrows($sqllump)
{
global $debug, $debuginfo, $mysqlloosetime;
$b = microtime();
$num = mysql_num_rows($sqllump);
$mysqlloosetime += microtime() - $b;
if (($debug>0) && ($debug<4))
{
if ($debug == 2)$debuginfo .= "<p>Number of rows is $num for $sqllump". mysql_error() ."</p>";
else echo "<p>Number of rows is $num for $sqllump". mysql_error() ."</p>";
}
return $num;
}

This is the actual RSS link: www.anmlmdirectory.com/rssf...cending&thecondition=catid!=8ANDcatid!=9

Try to run that in http://www.feedvalidator.org . It says that there is a <br /> before the < ?xml version="1.0"? > in the feed.

Where is that <br /> coming from?

Thanks
David
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Aug 09, 2005 - 9:52 AM:

Load time so far: 0.09 seconds.
Performing query: SELECT id FROM wsnlinks_categories WHERE validated=1 AND hide=0 AND isalbum=0 ORDER BY id DESC LIMIT 0,1;

Load time so far: 0.1 seconds.
Performing query: SELECT name,value FROM wsnlinks_switches WHERE id>0 ;

Number of rows is 52 for Resource id #37

Load time so far: 0.1 seconds.
Performing query: SELECT original,replacement,description,id,sortorder FROM wsnlinks_markup WHERE type='smilie' ORDER BY sortorder ;

Number of rows is 14 for Resource id #38

Load time so far: 0.11 seconds.
Performing query: SELECT id,title,caneditown,caneditall,canvote,isadmin,canpost,canemail,validatecats,validatecomments,validatelinks,validateedits,cansubmitlinks,cansubmitcategories,cansubmitcomments,caneditownlinks,caneditowncategories,caneditowncomments,caneditownprofile,caneditalllinks,caneditallcategories,caneditallcomments,caneditallprofiles,candownloadfiles,canupload,canviewip,limitlinks,canemailmembers,canusehtml,limitlinksdaily,canalias,cancopy,candeleteown,candeleteall,candofulledit,candeletecategories,candeletecomments,candeleteowncategories,candeleteowncomments,candeletemembers,candeleteownmembers,canaliascategories,canviewpages,caneditvotes,numaliases,canviewvotes,canhideownlinks,canhideowncategories,canhideowncomments,canhidealllinks,canhideallcategories,canhideallcomments,canratecomments,bytespermem,canpm,canim,canharddelete,limitpms,limitpmsdaily,canviewdeleted,cansubmitpolls,candeletepolls,candeleteownpolls,caneditpolls,caneditownpolls,attachperpost,attachperpm,canviewshouts,caneditshouts,caneditownshouts,candeleteshouts,candeleteownshouts,cansubmitshouts,canpollvote,customtitle,canviewinvisible,namestyle,canpmimportant,canviewmodlog,isleader,cansubmitquotes,validatequotes,candeletequotes,candeleteownquotes,canreport,canusesearch,attachperlink,validateattachments FROM wsnlinks_membergroups WHERE id>0 ;

Load time so far: 0.12 seconds.
Performing query: SELECT id,name,parent,validated,description,time,parentnames,parentids,numlinks,hide,lastlinktime,custom,lastedit,moderators,headerinfo,related,numsub,type,permissions,subscribers,subscriber,mixtypes,isalbum,orderlinks,totalcomments,ulsearchmax,ulsearchquery,ulsearchadult,alias,catcols,linkcols,dmozpath,sponsorlinks,views,customwrap,deleted,reqlinks,reqcoms,reqlinksdelay,priority,levelsdeep,lastposterid,lastpostername,lastcommenttime,lastthreadid,lastthreadtitle,linkshere,unvalidatedlinks,unvalidatedcomments,actaslink,countposts FROM wsnlinks_categories WHERE validated=1 AND deleted=0 AND hide=0 ;

Number of rows is 51 for Resource id #44

Load time so far: 0.13 seconds.
Performing query: LOCK TABLES wsnlinks_email WRITE, wsnlinks_links WRITE, wsnlinks_categories WRITE, wsnlinks_members WRITE;

Load time so far: 0.13 seconds.
Performing query: SELECT id,`to`,subject,message,headers,replacement,mime FROM wsnlinks_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10;

Number of rows is 0 for Resource id #45

Load time so far: 0.13 seconds.
Performing query: UNLOCK TABLES;


Warning: Cannot modify header information - headers already sent by (output started at /home/anmlmdirectory.com/public_html/classes/database.php:276) in /home/anmlmdirectory.com/public_html/rssfeed.php on line 22

Load time so far: 0.15 seconds.
Performing query: SELECT id,title,url,description,rating,votes,validated,catid,sumofvotes,email,time,hits,numcomments,hide,ownerid,voterips,voterids,lastedit,type,filename,filetitle,notify,suspect,downloads,pendingedit,funds,suspended,alias,expire,ip,inalbum,typeorder,recipurl,hitsin,recipwith,hitsinips,hitsoutips,lastcomment,related,inhidden,viewers,threadviewers,hitsintemp,hitsouttemp,origtype,importance,parentids,timesdead,timesemailed,threadclosed,threadposters,xwidth,yheight,lastposterid,lastpostername,sticky,ownername,deleted,deletionreason,movedto,pollid,deletedby,posticon,timevalidated,filefield,tier,payoutamount,payouttype,payoutmore,investment,recurring,minpayout,payduration,paymethod,tracksoftware,availability,check,opened,rssfeed,businessphone,phone,skype,searchpayoutmore,meanpayoutamount,searchinvestment,searchminpayout,searchrecurring FROM wsnlinks_links WHERE validated=1 AND hide=0 AND alias=0 AND deleted=0 AND catid!=8ANDcatid!=9 ORDER BY rating ASC LIMIT 0,100;


Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/anmlmdirectory.com/public_html/classes/database.php on line 108

Number of rows is for Unknown column '8ANDcatid' in 'where clause'

Warning: Cannot modify header information - headers already sent by (output started at /home/anmlmdirectory.com/public_html/classes/database.php:276) in /home/anmlmdirectory.com/public_html/end.php on line 143
http://www.anmlmdirectory.com An MLM Directory | Affiliate Business Directory | Opportunity List en-us

Load time so far: 0.2 seconds.
Performing query: SELECT memberid,starttime,time FROM wsnlinks_sessions WHERE time < 1123602483 AND memberid > 0 ;

Unknown column '8ANDcatid' in 'where clause'

Number of rows is 0 for Resource id #53

Load time so far: 0.21 seconds.
Performing query: DELETE FROM wsnlinks_sessions WHERE time < 1123602483;

Load time so far: 0.21 seconds.
Performing query: UPDATE wsnlinks_sessions SET starttime=0, time=0 WHERE time < 1123605783;

Load time so far: 0.21 seconds.
Performing query: SELECT starttime FROM wsnlinks_sessions WHERE ip='24.64.73.161' AND memberid=0 ;

Number of rows is 0 for Resource id #54

Load time so far: 0.21 seconds.
Performing query: INSERT INTO wsnlinks_sessions(memberid,ip,location,time,starttime,browser,areaname,nopermission) VALUES('0','24.64.73.161','http://anmlmdirectory.com/rssfeed.php?type=links&number=50&field=rating&ascdesc=ascending&thecondition=catid!=8ANDcatid!=9','1123606083','1123606083','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1','http://anmlmdirectory.com','0');

closing database connection
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 09, 2005 - 10:54 AM:

Number of rows is for Unknown column '8ANDcatid' in 'where clause'

You're using illegal mysql syntax in your condition -- it appears that for some unknown reason you've gone through and removed all the spaces to make all the words run togeather.
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Aug 09, 2005 - 12:44 PM:

Load time so far: 0.11 seconds.
Performing query: SELECT id FROM wsnlinks_categories WHERE validated=1 AND hide=0 AND isalbum=0 ORDER BY id DESC LIMIT 0,1;

Load time so far: 0.11 seconds.
Performing query: SELECT name,value FROM wsnlinks_switches WHERE id>0 ;

Number of rows is 52 for Resource id #37

Load time so far: 0.12 seconds.
Performing query: SELECT original,replacement,description,id,sortorder FROM wsnlinks_markup WHERE type='smilie' ORDER BY sortorder ;

Number of rows is 14 for Resource id #38

Load time so far: 0.12 seconds.
Performing query: SELECT id,title,caneditown,caneditall,canvote,isadmin,canpost,canemail,validatecats,validatecomments,validatelinks,validateedits,cansubmitlinks,cansubmitcategories,cansubmitcomments,caneditownlinks,caneditowncategories,caneditowncomments,caneditownprofile,caneditalllinks,caneditallcategories,caneditallcomments,caneditallprofiles,candownloadfiles,canupload,canviewip,limitlinks,canemailmembers,canusehtml,limitlinksdaily,canalias,cancopy,candeleteown,candeleteall,candofulledit,candeletecategories,candeletecomments,candeleteowncategories,candeleteowncomments,candeletemembers,candeleteownmembers,canaliascategories,canviewpages,caneditvotes,numaliases,canviewvotes,canhideownlinks,canhideowncategories,canhideowncomments,canhidealllinks,canhideallcategories,canhideallcomments,canratecomments,bytespermem,canpm,canim,canharddelete,limitpms,limitpmsdaily,canviewdeleted,cansubmitpolls,candeletepolls,candeleteownpolls,caneditpolls,caneditownpolls,attachperpost,attachperpm,canviewshouts,caneditshouts,caneditownshouts,candeleteshouts,candeleteownshouts,cansubmitshouts,canpollvote,customtitle,canviewinvisible,namestyle,canpmimportant,canviewmodlog,isleader,cansubmitquotes,validatequotes,candeletequotes,candeleteownquotes,canreport,canusesearch,attachperlink,validateattachments FROM wsnlinks_membergroups WHERE id>0 ;

Load time so far: 0.13 seconds.
Performing query: SELECT id,name,parent,validated,description,time,parentnames,parentids,numlinks,hide,lastlinktime,custom,lastedit,moderators,headerinfo,related,numsub,type,permissions,subscribers,subscriber,mixtypes,isalbum,orderlinks,totalcomments,ulsearchmax,ulsearchquery,ulsearchadult,alias,catcols,linkcols,dmozpath,sponsorlinks,views,customwrap,deleted,reqlinks,reqcoms,reqlinksdelay,priority,levelsdeep,lastposterid,lastpostername,lastcommenttime,lastthreadid,lastthreadtitle,linkshere,unvalidatedlinks,unvalidatedcomments,actaslink,countposts FROM wsnlinks_categories WHERE validated=1 AND deleted=0 AND hide=0 ;

Number of rows is 51 for Resource id #44

Load time so far: 0.15 seconds.
Performing query: LOCK TABLES wsnlinks_email WRITE, wsnlinks_links WRITE, wsnlinks_categories WRITE, wsnlinks_members WRITE;

Load time so far: 0.15 seconds.
Performing query: SELECT id,`to`,subject,message,headers,replacement,mime FROM wsnlinks_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10;

Number of rows is 0 for Resource id #45

Load time so far: 0.15 seconds.
Performing query: UNLOCK TABLES;


Warning: Cannot modify header information - headers already sent by (output started at /home/anmlmdirectory.com/public_html/classes/database.php:276) in /home/anmlmdirectory.com/public_html/rssfeed.php on line 22

Load time so far: 0.17 seconds.
Performing query: SELECT id,title,url,description,rating,votes,validated,catid,sumofvotes,email,time,hits,numcomments,hide,ownerid,voterips,voterids,lastedit,type,filename,filetitle,notify,suspect,downloads,pendingedit,funds,suspended,alias,expire,ip,inalbum,typeorder,recipurl,hitsin,recipwith,hitsinips,hitsoutips,lastcomment,related,inhidden,viewers,threadviewers,hitsintemp,hitsouttemp,origtype,importance,parentids,timesdead,timesemailed,threadclosed,threadposters,xwidth,yheight,lastposterid,lastpostername,sticky,ownername,deleted,deletionreason,movedto,pollid,deletedby,posticon,timevalidated,filefield,tier,payoutamount,payouttype,payoutmore,investment,recurring,minpayout,payduration,paymethod,tracksoftware,availability,check,opened,rssfeed,businessphone,phone,skype,searchpayoutmore,meanpayoutamount,searchinvestment,searchminpayout,searchrecurring FROM wsnlinks_links WHERE validated=1 AND hide=0 AND alias=0 AND deleted=0 AND catid ! = 8 AND catid ! = 9 ORDER BY rating ASC LIMIT 0,100;


Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/anmlmdirectory.com/public_html/classes/database.php on line 108

Number of rows is for You have an error in your SQL syntax near '! = 8 AND catid ! = 9 ORDER BY rating ASC LIMIT 0,100' at line 1

Warning: Cannot modify header information - headers already sent by (output started at /home/anmlmdirectory.com/public_html/classes/database.php:276) in /home/anmlmdirectory.com/public_html/end.php on line 143
http://www.anmlmdirectory.com An MLM Directory | Affiliate Business Directory | Opportunity List en-us

Load time so far: 0.2 seconds.
Performing query: SELECT memberid,starttime,time FROM wsnlinks_sessions WHERE time < 1123612614 AND memberid > 0 ;

You have an error in your SQL syntax near '! = 8 AND catid ! = 9 ORDER BY rating ASC LIMIT 0,100' at line 1

Number of rows is 0 for Resource id #53

Load time so far: 0.2 seconds.
Performing query: DELETE FROM wsnlinks_sessions WHERE time < 1123612614;

Load time so far: 0.2 seconds.
Performing query: UPDATE wsnlinks_sessions SET starttime=0, time=0 WHERE time < 1123615914;

Load time so far: 0.2 seconds.
Performing query: SELECT starttime FROM wsnlinks_sessions WHERE ip='24.64.73.161' AND memberid=0 ;

Number of rows is 1 for Resource id #54

Load time so far: 0.2 seconds.
Performing query: UPDATE wsnlinks_sessions SET time='1123616214', location='http://anmlmdirectory.com/rssfeed.php?type=links&number=50&field=rating&ascdesc=ascending&thecondition=catid%20!%20=%208%20AND%20catid%20!%20=%209', catid='', threadid='', areaname='http://anmlmdirectory.com', nopermission = 0 WHERE ip='24.64.73.161';

closing database connection

===================================

rssfeed.php?type=links&number=50&field=rating&ascdesc=ascending&thecondition=catid ! = 8 AND catid ! = 9

That's what happened when I put the spaces back

Thanks
David
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Aug 09, 2005 - 5:41 PM:

Also,
www.anmlmdirectory.com/rssf...cending&thecondition=catid ! = 8 AND catid ! = 9

doesn't validate as an rss feed at http://feedvalidator.org

David
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 10, 2005 - 9:59 PM:

Please go back and read my original instructions, or read a quick mysql or even javascript operators reference since javascript operators are pretty similar too (though where you use == in javascript you'd use = here). Adding spaces where they were never supposed to be, to separate ! and = into another form of nonsense will naturally kill it.

My general point is that randomly adding and removing spaces will kill anything every time, so don't do it.
finnerss
Beginner

Usergroup: Customer
Joined: Feb 18, 2003

Total Topics: 1
Total Comments: 5
Posted Aug 17, 2005 - 9:58 PM:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/*******/public_html/******/links/classes/database.php on line 108

WSN links seems to be working fine, but it displays most of the time the site is loaded and if it's not causing harm, how can I get rid off it? it makes the site look "buggy"

Everything else seems to work fine.

I was trying to read this thread, but led me nowhere. I've not editted any code by hand nor I have done anything to mysql related stuff, so I don't think this means that I can't have spaces in descriptions using the browser based admin, right?

Please help me get rid off it.

Thanks

Sergio

P.S. It's the paid licensed version, not the free one
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
0 of 1 people found this comment helpful
Posted Aug 18, 2005 - 8:05 PM:

You need to post the debug output, as descrbed in the manual and the pinned thread. You should also consider not hijacking random unrelated threads.
finnerss
Beginner

Usergroup: Customer
Joined: Feb 18, 2003

Total Topics: 1
Total Comments: 5
Posted Aug 20, 2005 - 7:03 AM:

Hijacking? I searched for the exact error I have in my website, found this... Looked for a solution, and now I'm hijacking? Man, most people get mad for posting new thread without taking the time to search...

I will try to look for the mentioned manual instad and see how can I come up with ghe debug. sad
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#10 - Quote - Permalink
0 of 1 people found this comment helpful
Posted Aug 20, 2005 - 3:35 PM:

What you posted has nothing to do with RSS feeds. If you mean "Warning: mysql_num_rows()" that has exactly 403,000 google results, occours in every PHP/MySQL script, and every single WSN one would give that line number. Of course you can't be expected to know that, which is what the pinned thread is for. Searching is good, but the procedure thread is pinned at the top with the intention that you should read it. If you choose to ignore the problem report procedure when posting, it is impossible to help you and there is nothing I can do about that.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.