Webmastersite.net
Register Log In

database.php error
when searching comments

Comments on database.php error

isto
Member

Usergroup: Customer
Joined: Jul 02, 2003

Total Topics: 7
Total Comments: 17
isto
Posted Aug 26, 2006 - 6:21 AM:

I already searched the forums for a solution but didn't find one that works.


When a registered user looks at comments and clicks on the links for searching all links/comments made by one user this error appears:

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

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



and this is what the debug says:

Load time so far: 0.25 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,alias,catcols,linkcols,sponsorlinks,views,customwrap,deleted,reqlinks,reqcoms,reqlinksdelay,priority,levelsdeep,lastposterid,lastpostername,lastcommenttime,lastthreadid,lastthreadtitle,linkshere,unvalidatedlinks,unvalidatedcomments,actaslink,countposts,subcatshtml,catimage,descriptionde,namede FROM _categories WHERE validated=1 AND deleted=0 AND hide=0 ;

Number of rows is 5 for Resource id #48

Load time so far: 0.25 seconds.
Performing query: LOCK TABLES _email WRITE, _links WRITE, _categories WRITE, _members WRITE;

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

Number of rows is 0 for Resource id #49

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

Load time so far: 0.26 seconds.
Performing query: SELECT lastsearch FROM _sessions WHERE ip='84.130.44.187' ;

Number of rows is 1 for Resource id #53

Load time so far: 0.26 seconds.
Performing query: UPDATE _sessions SET lastsearch='1156598146' WHERE ip='84.130.44.187';

Load time so far: 0.26 seconds.
Performing query: SELECT id,title,url,description,rating,votes,validated,catid,sumofvotes,email,time,hits,numcomments,hide,ownerid,voterips,voterids,lastedit,type,notify,suspect,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,lastposterid,lastpostername,ownername,deleted,deletionreason,movedto,deletedby,timevalidated,filefield,message,sticky,downloads,pollid,posticon,savedby,filesizekb,titlede,descriptionde,mirror,offsite FROM _links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((= '1')) ORDER BY rating DESC LIMIT 0,45;

Load time so far: 0.26 seconds.
Performing query: SELECT COUNT(id) FROM _links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND ((= '1')) ;

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '= '1')) ORDER BY rating DESC LIMIT 0,45' at line 1

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

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

Number of rows is for You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '= '1'))' at line 1
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 27, 2006 - 3:08 AM:

Are you sure you're not using an old template? I can't reproduce this, but I remember something of the sort from many versions back.
isto
Member

Usergroup: Customer
Joined: Jul 02, 2003

Total Topics: 7
Total Comments: 17
isto
Posted Aug 28, 2006 - 11:22 AM:

I downloaded the script on 08/15/2006 and installed that script.

I changed only the style and some templates in order to get the cat image working (www.webmastersite.net/forum...highlight=category%20image)

No problems there.

Just the problem with the comments search.

Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 30, 2006 - 3:32 PM:

Then I must not understand what you're saying. Show me a link to the problem in the demo: http://www.wsnforum.com/linksuserdemo/thread/1048

English or multilingual?
isto
Member

Usergroup: Customer
Joined: Jul 02, 2003

Total Topics: 7
Total Comments: 17
isto
Posted Aug 31, 2006 - 11:43 AM:

multilanguage




Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 31, 2006 - 4:24 PM:

The link is exactly the same the in english and multilingual templates, that being search.php?filled=1&whichtype=comments&condition==&searchfields[0]=ownerid&search={MEMBERID}

What unusual thing might you be doing? Combining details and comments?
isto
Member

Usergroup: Customer
Joined: Jul 02, 2003

Total Topics: 7
Total Comments: 17
isto
Posted Sep 01, 2006 - 8:22 AM:

I did not combine the details and comments.

Not comments on the details page.



Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 02, 2006 - 12:25 PM:

Your template link looks the same as mine, but I still can't reproduce.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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