Webmastersite.net
Register Log In

not a valid MySQL result resource in ...
/classes/database.php on line 256

Comments on not a valid MySQL result resource in ...

capitaine
Forum Regular

Usergroup: Customer
Joined: Aug 05, 2005

Total Topics: 94
Total Comments: 272
Posted Aug 25, 2006 - 5:41 PM:

I get the following errors when I click on a search result (I have a toplist which outputs the most searched for keywords, and I've hyperlinked these...)

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

I get the following debug output:

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

Load time so far: 0.2 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 #48

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

Load time so far: 0.29 seconds.
Performing query: SELECT lastsearch FROM wsnlinks_sessions WHERE ip=ྐ.9.52.15' ;

Number of rows is 1 for Resource id #53

Load time so far: 0.3 seconds.
Performing query: UPDATE wsnlinks_sessions SET lastsearch=融�' WHERE ip=ྐ.9.52.15'

Load time so far: 0.32 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,price,currency,message,sticky,downloads,pollid,posticon,savedby,pagerank FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND (((title LIKE '%jobs%') OR (url LIKE '%jobs%') OR (description LIKE '%jobs%') OR (price LIKE '%jobs%') OR (longdescription LIKE '%jobs%'))) ORDER BY rating DESC LIMIT 0,45;

Load time so far: 0.32 seconds.
Performing query: SELECT COUNT(id) FROM wsnlinks_links WHERE (validated=1 AND hide=0 AND inhidden=0 AND deleted=0 AND alias=0 AND inalbum=0) AND (((title LIKE '%jobs%') OR (url LIKE '%jobs%') OR (description LIKE '%jobs%') OR (price LIKE '%jobs%') OR (longdescription LIKE '%jobs%'))) ;

Unknown column 'longdescription' in 'where clause'

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 Unknown column 'longdescription' in 'where clause'

Load time so far: 0.5 seconds.
Performing query: SELECT COUNT(id) FROM wsnlinks_categories WHERE validated=1 AND hide=0 AND parent=0 AND deleted=0 ;

Unknown column 'longdescription' in 'where clause'
Count is 3

I have removed 'longdescription' from all possible areas using the remove field feature in admin panel! SO I'm not sure why this happens...

capitaine
Forum Regular

Usergroup: Customer
Joined: Aug 05, 2005

Total Topics: 94
Total Comments: 272
Posted Aug 25, 2006 - 5:45 PM:

Paul the WYSWIG editor here just isn't working.... can't even use italics! And sorry, don't want to have to use the plain text editor....
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 26, 2006 - 3:38 PM:

You have 'longdesription' selected as a field which should be searched by the simple search, and you don't actually have such a field since you've removed it, hence the error.
capitaine
Forum Regular

Usergroup: Customer
Joined: Aug 05, 2005

Total Topics: 94
Total Comments: 272
Posted Aug 26, 2006 - 7:47 PM:

Thanks. I actually found that that wasn't the case. I went into Search/Searchable fields and found that longdescription was not in the drop-down list at all. I had a few fields selected though, so I de-selected everything and then re-selected those fields.

And that fixed it. I don't have this issue anymore. However it looks like it somehow 'stickied' somewhere... and that if you delete a field that was also a searchable one, you have to also de-select and re-select the other fields again.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 27, 2006 - 2:48 PM:

It wasn't in the list, because the list only includes existing fields, but it was selected anyhow. If you remove a field which is selected in list somewhere -- be it there or in required fields -- you'll have to submit the page in order to get it unselected.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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