Load time so far: 0.13 seconds. Performing query: LOCK TABLES archive_email WRITE, archive_links WRITE, archive_categories WRITE, archive_members WRITE;
Load time so far: 0.13 seconds. Performing query: SELECT id,`to`,subject,message,headers,replacement,mime FROM archive_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10;
Number of rows is 0 for Resource id #47
Load time so far: 0.13 seconds. Performing query: UNLOCK TABLES;
Load time so far: 0.14 seconds. Performing query: SELECT id,frequency,filename,nextrun FROM archive_crons WHERE nextrun < 1158873694 ORDER BY id ASC LIMIT 0,1;
Number of rows is 0 for Resource id #49
Load time so far: 0.14 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 archive_categories WHERE parent=0 AND validated=1 AND hide=0 AND isalbum=0 AND deleted=0 ORDER BY priority ASC,name ASC LIMIT 0,40;
Number of rows is 12 for Resource id #51
Load time so far: 0.14 seconds. Performing query: SELECT id FROM archive_categories WHERE parent=0 AND validated=1 AND hide=0 AND deleted=0 ;
Load time so far: 0.53 seconds. Performing query: SELECT COUNT(id) FROM archive_sessions WHERE memberid>0 ;
Count is 1
Load time so far: 0.53 seconds. Performing query: SELECT COUNT(id) FROM archive_sessions WHERE memberid=0 AND isrobot=0 ;
Count is 3
Load time so far: 0.53 seconds. Performing query: SELECT COUNT(id) FROM archive_sessions WHERE memberid=0 AND isrobot=1 ;
Count is 0
Load time so far: 0.62 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,filetype FROM archive_links WHERE validated=1 AND hide=0 AND deleted=0 AND inhidden=0 AND alias=0 AND inalbum=0 ORDER BY r DESC LIMIT 0,0;
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/v124547/archive/classes/database.php on line 108
Number of rows is for Unknown column 'r' in 'order clause'
Load time so far: 0.62 seconds. Performing query: SELECT id,memberid,location,time,ip,browser,starttime,catid,threadid,areaname,lastsearch,nopermission,inchat,name,isrobot,lastchat,groupnamestyle,acceptims,visibility FROM archive_sessions WHERE time > 1158872795 AND (memberid>0) ORDER BY a DESC LIMIT 0,a;
Unknown column 'r' in 'order clause'
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/v124547/archive/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 'a' at line 1
Load time so far: 0.63 seconds. Performing query: SELECT COUNT(id) FROM archive_categories WHERE validated=1 AND hide=0 AND parent=0 AND deleted=0 ;
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 'a' at line 1 Count is 12
The script shows the top 5 links but when trying to get the top 5 links by top rated or visited, this error appears.
It says you're sorting your toplist by a nonexistant field named 'r'.
You haven't specified your language but I happened to notice the multilingual template has <option value="rating">{LANG_MAIN_TOPRATED}</option> malformed as <option value="rating">{LANG_MAIN_TOPRATED}/option> ... though that doesn't seem to lead to any error. What template code are you using?
I can only report that when I use the WSN Links 3.4.3 multilingual template set and select to show 5 links sorted by rating, there are no errors. Perhaps you can tell me how to reproduce your issue.
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Error when trying the top links
Member
Usergroup: Customer
Joined: Jul 02, 2003
Total Topics: 7
Total Comments: 17
Load time so far: 0.13 seconds.
Performing query: LOCK TABLES archive_email WRITE, archive_links WRITE, archive_categories WRITE, archive_members WRITE;
Load time so far: 0.13 seconds.
Performing query: SELECT id,`to`,subject,message,headers,replacement,mime FROM archive_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10;
Number of rows is 0 for Resource id #47
Load time so far: 0.13 seconds.
Performing query: UNLOCK TABLES;
Load time so far: 0.14 seconds.
Performing query: SELECT id,frequency,filename,nextrun FROM archive_crons WHERE nextrun < 1158873694 ORDER BY id ASC LIMIT 0,1;
Number of rows is 0 for Resource id #49
Load time so far: 0.14 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 archive_categories WHERE parent=0 AND validated=1 AND hide=0 AND isalbum=0 AND deleted=0 ORDER BY priority ASC,name ASC LIMIT 0,40;
Number of rows is 12 for Resource id #51
Load time so far: 0.14 seconds.
Performing query: SELECT id FROM archive_categories WHERE parent=0 AND validated=1 AND hide=0 AND deleted=0 ;
Number of rows is 12 for Resource id #52
Setting cookie with name returnto, value www.chevron26.com/archive/i...D=5&thefield%5B1%5D=rating and duration 1158874595
Load time so far: 0.53 seconds.
Performing query: SELECT COUNT(id) FROM archive_sessions WHERE memberid>0 ;
Count is 1
Load time so far: 0.53 seconds.
Performing query: SELECT COUNT(id) FROM archive_sessions WHERE memberid=0 AND isrobot=0 ;
Count is 3
Load time so far: 0.53 seconds.
Performing query: SELECT COUNT(id) FROM archive_sessions WHERE memberid=0 AND isrobot=1 ;
Count is 0
Load time so far: 0.62 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,filetype FROM archive_links WHERE validated=1 AND hide=0 AND deleted=0 AND inhidden=0 AND alias=0 AND inalbum=0 ORDER BY r DESC LIMIT 0,0;
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/v124547/archive/classes/database.php on line 108
Number of rows is for Unknown column 'r' in 'order clause'
Load time so far: 0.62 seconds.
Performing query: SELECT id,memberid,location,time,ip,browser,starttime,catid,threadid,areaname,lastsearch,nopermission,inchat,name,isrobot,lastchat,groupnamestyle,acceptims,visibility FROM archive_sessions WHERE time > 1158872795 AND (memberid>0) ORDER BY a DESC LIMIT 0,a;
Unknown column 'r' in 'order clause'
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/v124547/archive/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 'a' at line 1
Load time so far: 0.63 seconds.
Performing query: SELECT COUNT(id) FROM archive_categories WHERE validated=1 AND hide=0 AND parent=0 AND deleted=0 ;
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 'a' at line 1
Count is 12
The script shows the top 5 links but when trying to get the top 5 links by top rated or visited, this error appears.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It says you're sorting your toplist by a nonexistant field named 'r'.
You haven't specified your language but I happened to notice the multilingual template has <option value="rating">{LANG_MAIN_TOPRATED}</option> malformed as <option value="rating">{LANG_MAIN_TOPRATED}/option> ... though that doesn't seem to lead to any error. What template code are you using?
Member
Usergroup: Customer
Joined: Jul 02, 2003
Total Topics: 7
Total Comments: 17
german.
how to remove this r-field?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Please answer my question about your template code.
Member
Usergroup: Customer
Joined: Jul 02, 2003
Total Topics: 7
Total Comments: 17
I did not change the template code for the main.tpl
<p align="left">
{TOTALLINKS} {LANG_GENERAL_LINKS} | {TOTALCATS} {LANG_GENERAL_CATEGORIES} <IF {SWITCH_HITS}>| {TOTALHITS} {LANG_GENERAL_CLICKS} </IF> <IF {SWITCH_COMMENTS}>| {TOTALCOMMENTS} {LANG_GENERAL_COMMENTS} </IF> <IF {SWITCH_MEMBERS}>| <a href="members/">{TOTALMEMBERS} {LANG_GENERAL_MEMBERS}</a></IF>
<br>{LANG_MAIN_LASTUPDATE} {LASTUPDATE}
<IF {SWITCH_MEMBERS}><br>{LANG_MAIN_WELCOMENEWEST}</IF>
</p>
<table width="100%"><tr>
<td width="75%" valign="top">
<IF {SWITCH_SORTCATS}>
<div class="sort">
<form action="index.php?todo=ordercats" method="post">
<center>{LANG_MAIN_SORTCATSBY}
<select name="catfield">
<option value="name">{LANG_GENERAL_NAME_LOWER}</option>
<option value="numlinks">{LANG_SEARCH_NUMLINKS}</option>
<option value="numsub">{LANG_SEARCH_NUMSUB}</option>
<option value="time">{L_LANG_SEARCH_DATE}</option>
<option value="lastedit">{LANG_SHOWLINKS_LASTEDITED}</option>
</select>
{LANG_MISC_IN}
<select name="catascdesc">
<option value="asc">{LANG_GENERAL_ASC}</option>
<option value="desc">{LANG_GENERAL_DESC}</option>
</select>
{LANG_MAIN_ORDER}
<input type="submit" value="{LANG_GENERAL_SORT}" class="button">
</center>
</form>
</div>
</IF>
<table align="center" cellpadding="5" cellspacing="10">
<!-- BEGIN CATSBODY -->
<!-- BEGIN REGULAR -->
<td {CATWIDTH} valign="top" class="category">
<IF {CATIMAGE}> <img src="templates/default/images/{CATID}.jpg" alt="Stargate"></IF> <a href="index.php?action=displaycat&catid={CATID}" class="categoryname"><IF {VISITORLANGUAGE} is Deutsch>{CATNAMEDE}<OTHERWISE>{CATNAME}</IF></a> <IF {CATNUMLINKS}>({CATNUMLINKS}) </IF>{CATHASNEW} {CATADMIN}<br>
<IF {VISITORLANGUAGE} is Deutsch>{CATDESCRIPTIONDE}<OTHERWISE>{CATDESCRIPTION} </IF><br>
<!-- BEGIN SUBSUB -->
<a href="index.php?action=displaycat&catid={CATID}"><IF {VISITORLANGUAGE} is Deutsch>{CATNAMEDE}<OTHERWISE>{CATNAME}</IF></a>,
<!-- END SUBSUB -->
</td>
<!-- END REGULAR -->
<!-- END CATSBODY -->
</table>
</td>
<IF {SWITCH_MAINTOPLIST}>
<td width="25%" valign="top">
<IF {CANADD}>
<div class="box">
<div class="boxtitle" onClick="minmax('addbox')">{LANG_ADDBOXTITLE}</div>
<div id="addbox" class="boxbody">
<IF {THISMEMBERGROUPCANSUBMITCATEGORIES}><a href="suggest.php?action=addcat">{LANG_TITLE_SUGGESTNEWCAT}</a><br></IF>
<IF {THISMEMBERGROUPCANSUBMITLINKS}><a href="suggest.php?action=addlink">{LANG_TITLE_SUGGESTNEWLINK}</a><br></IF>
</div>
</div>
</IF>
<div class="box">
<div class="boxtitle" onClick="minmax('searchbox')">{LANG_MAIN_SEARCH}</div>
<div id="searchbox" class="boxbody">
<form action="search.php?filled=1&condition={DEFAULTSEARCHTYPE}" method="post" style="margin: 0px; padding: 0px;">
<input type="text" name="search" size="15">
<select name="whichtype"><option value="links">{L_LANG_MAIN_SEARCHLINKS}</option><option value="all">{L_LANG_MAIN_SEARCHALL}</option></select>
<input type="submit" value="{LANG_MAIN_SEARCH}" class="button">
<br><a href="search.php">{LANG_MAIN_ADVANCEDSEARCH}</a></form>
</div>
</div>
<IF {SWITCH_MAINTOPLIST}>
<div class="box">
<div class="boxtitle" onClick="minmax('topbox')">{LANG_MISC_ARTICLE_PLURAL} {LANG_MAIN_TOPLINKS}</div>
<div class="boxbody" id="topbox">
<form action="index.php" style="margin: 0px; padding: 0px;">
{P_LANG_GENERAL_SHOW} <select name="number[1]"><option value="5">5</option><option value="10">10</option><option value="15">15</option></select> <select name="thefield[1]"><option value="time">{LANG_MAIN_NEWEST}</option><option value="rating">{LANG_MAIN_TOPRATED}</option><option value="hits">{LANG_MAIN_MOSTVISITED}</option></select> <input type="submit" value="{LANG_GENERAL_GO}" class="button">
<br>
<!-- BEGIN TOPLIST 1 -->
<CONFIG>links,id,5,descending</CONFIG>
{NUMBER}. <a href="{TRACKLINKURL}" class="newlinks" {EXTERNALLINKS}>{LINKTITLE}</a> {LINKADMIN}
<br>
<!-- END TOPLIST 1 -->
</form>
</div>
</div>
</IF>
<IF {SWITCH_ONLINEUSERS}>
<div class="box">
<div class="boxtitle" onClick="minmax('onlinebox')">{LANG_TITLE_ONLINEUSERS}</div>
<div class="boxbody" id="onlinebox">
{TOTALMEMBERSONLINE} {LANG_GENERAL_MEMBERS}, {TOTALGUESTSONLINE} {LANG_ONLINE_GUESTS}
<br>
<!-- BEGIN TOPLIST 3 -->
<CONFIG>online,time,100,descending,memberid>0,,</CONFIG>
{ONLINEREADYTOCHATICON} <a href="memberlist.php?action=profile&id={ONLINEMEMBERID}" class="{ONLINEGROUPNAMESTYLE}">{ONLINENAME}</a>{ONLINEINVISMARKER},
<!-- END TOPLIST 3 -->
<br><a href="online.php">{LANG_MAIN_VIEWDETAILS}</a>
</div>
</div>
</IF>
</td>
</IF>
</tr>
</table>
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I can only report that when I use the WSN Links 3.4.3 multilingual template set and select to show 5 links sorted by rating, there are no errors. Perhaps you can tell me how to reproduce your issue.