Webmastersite.net
Register Log In

Bulk edit links mysql error

Comments on Bulk edit links mysql error

Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Jul 05, 2006 - 9:27 AM:

I've just upgraded to 3.3.21 and now I get an error on the bulk edit links page. Here's the part of the debug:

Warning: Cannot modify header information - headers already sent by (output started at /home/linklou/public_html/classes/database.php:276) in /home/linklou/public_html/end.php on line 142

Load time so far: 0.53 seconds.
Performing query: SELECT FROM utable WHERE validated=1 AND (spotlight='yes' and filefield=1) ORDER BY rand() ASC LIMIT 0,1;

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/linklou/public_html/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 'FROM utable WHERE validated=1 AND (spotlight='yes' and filefield=1) ORDER BY ran' at line 1

Load time so far: 0.62 seconds.
Performing query: SELECT id FROM wsnlinks_categories WHERE validated=1 AND hide=0 AND isalbum=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 'FROM utable WHERE validated=1 AND (spotlight='yes' and filefield=1) ORDER BY ran' at line 1

Number of rows is 938 for Resource id #56


I have a toplist in the wrapper which randomly displays a link button, and it's working fine on every other site (as far as I can tell right now), but on this page it's not showing up. At first I was thinking that there's a conflict with the toplist number, but changing that number didn't change the error, and I think the bulk edit page isn't using a toplist anyway, right?

Editing is working fine also, just wondering what's causing this... smiling face
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 05, 2006 - 2:00 PM:

What is 'utable'? It doesn't know what fields the table has, which seems natural enough since it's not a WSN table.
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Jul 05, 2006 - 2:31 PM:

I have no idea smiling face I assumed it was some part of WSN Links, which I just didn't notice before...
Clearly that is the random button toplist part, so I don't get why this error only shows on this one page. Well, as I am the only person able to access this page maybe I shouldn't worry too much.

BTW, I just saw that today is your birthday. I had no idea you're my age sticking out tongue

Happy Birthday!
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 08, 2006 - 12:41 AM:

'utable' must be specified somewhere since it shows up. What's the toplist? Is there some member integration at work?

I didn't know you were so ancient too. Thanks. smiling face
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Jul 09, 2006 - 6:37 AM:

no member integration
Here's the toplist code
<!-- BEGIN TOPLIST 11 -->
<CONFIG>links,rand(),1,ascending,spotlight='yes' and filefield=1,,,0,0,0,0</CONFIG>
<a href="{TRACKLINKURL}" {EXTERNALLINKS}><img src="download.php?id={LINKID}" border=0 width=100 height=35 style="border:5px solid #5C4E3F;" alt="{LINKTITLE}"></a>
<!-- END TOPLIST 11 -->


I am moving my directory to a new domain: http://link-lounge.com
It's the random button in the middle of the sidebar.


Guess what, I have another toplist question.
I am trying to make this one toplist you're explaining in the manual, the make a toplist of all links in category #1 and all its subcategories.
When I check my links in the database, for most links the "parentids" field is empty... I mean, there is still a toplist showing up fine, but I'm not sure if all links are included, do you know what I mean?

I also tried to include some variables. By default the toplist is supposed to display the general list of links in all categories. And then by clicking on a link people should be able to filter the toplist by main categories.
www.link-lounge.com/index.p...stom=yes&TID=custom-top100
For now I added this
<? if ($topic == "") {?>
<CONFIG>links,hitsin;id,100,descending;ascending,hitsin > 0,,1,0,0,0,</CONFIG> <? } else if ($topic == "fansites") {
?>
<CONFIG>links,hitsin;id,100,descending;ascending,catid=30 OR parentids LIKE '%, 30, %' AND hitsin > 0,,1,0,0,0,</CONFIG>
<? } ?>


But somehow this is completely ignored ...
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 10, 2006 - 7:08 PM:

Parentids is empty for any link which doesn't have a grandparent.

Mutliple config lines for a toplist isn't legal, the config line has to be one line exactly after the toplist declaration. To give people a link to change a toplist, just pass the value as covered somewhere in the toplist section of the manual:
index.php?thecondition[11]=catid=30%20OR%20parentids%20LIKE%30'%, 20, %'%20AND%20hitsin>0

the above being for a toplist numbered 11.

The default template set's main.tpl gives you an example of a toplist which you can change via selectors, all that converts to links just as well.
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Jul 11, 2006 - 3:36 AM:

Parentids is empty for any link which doesn't have a grandparent.

I see, that explains a lot smiling face

The default template set's main.tpl gives you an example of a toplist which you can change via selectors, all that converts to links just as well.

Thanks, I'll look into that.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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