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

question can you explain this code

Quote Reply
question can you explain this code
Hello all,

I need to mod this part code in the page.cgi but i don't know exactly what this does only i think i have to modify it because i need a different build.

# Fetch the subcategory list.
$get_links = $LINKDB->prepare (" SELECT * FROM Links WHERE CategoryID = ? ORDER BY $LINKS{build_sort_order_category} LIMIT 1000 ");
$get_links->execute ($category_r->{'ID'});
$links_r = $get_links->fetchall_arrayref || [];


The part CategoryID = ? have to be something like:
CategoryName = Links.[here the content of Category.CategoryName] and Links.[here the content of Category.CategoryName] = "Yes"

But i don't know what to put in [here the content of Category.CategoryName] maybe $Category{CategoryName} or something like that ? Man i have to learn MySQL quick...

What does the code $get_links->execute ($category_r->{'ID'}); do ?

And maybe you can explain the whole part of code to me?

... well basically i have 12 extra fields in the links table and the 12 records in the category table where the categoryname is the same as the extra fields names in the links table.

I have to modify it this way because i can't use alternative links....

Allready thanks.

Regards Startpoint.

Subject Author Views Date
Thread question can you explain this code startpoint 4139 Aug 27, 2000, 5:41 PM
Thread Re: question can you explain this code
Alex404 4059 Aug 28, 2000, 1:22 AM
Thread Re: question can you explain this code
startpoint 4055 Aug 28, 2000, 3:46 AM
Thread Re: question can you explain this code
Alex404 4064 Aug 28, 2000, 5:58 AM
Thread Re: question can you explain this code
startpoint 4058 Aug 28, 2000, 8:03 AM
Thread Re: question can you explain this code
Alex404 4036 Aug 29, 2000, 1:50 AM
Thread Re: question can you explain this code
startpoint 4029 Aug 29, 2000, 7:23 AM
Thread Re: question can you explain this code
Alex404 4040 Aug 29, 2000, 9:16 AM
Post Re: question can you explain this code
startpoint 4019 Aug 30, 2000, 8:59 AM