Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Ranking Ok, but how to save it?

Quote Reply
Ranking Ok, but how to save it?
Ok, have done the Ranking for every link and every category; no wmy problem:

1. I have a new field called rank;
2. In sub build_category_pages (build.cgi)
I count and give out the rank for every link.

Now two possibilities:
Save this number direct from sub build_category_pages
to Link:Rank or do it in sub site_html_link (HTML_Templates)

In both i need
1. The ID of the Link (How to get it?)
2. The SQL-Syntax like:
UPDATE Links set Rank = $counter where ID=$needvar

As is see there are different methods to do this UPDATE.
Which is the right syntax to prepare this update?

Robert




Quote Reply
Please help In reply to
Ok, fix it till one but the importanst question:
How can i get in

sub build_category_pages (build.cgi)
the ID of the link i work on?

Have testet all the vars, but i cant find this damned ID.


OR:
I have in sub build_category_pages
the following var declared:

$tmp->{'links_count'}=$links_count;
$OUT{links} .= &site_html_link ($tmp);

With this i could set in link.htm the Tag <%links_count%>
but how could i get this value to a var???

My Var = rec{'links_count'} dont do it; i can get with rec all fields in the link table, but i need this var that i gave with the call of site_html_link

Now i have in site_html_link the ID and in the sub build_category_pages the vlaue of links_count.

But for my UPDATE ... i need both at one position.

Please help my out of this; tried it now for the last 6 hours, but it seems im too stupid for this.

Robert