Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Andy] Allow sorting links dynamically by price via category.html and search.cgi

Quote Reply
Re: [Andy] Allow sorting links dynamically by price via category.html and search.cgi In reply to
Thanks Andy,

search.cgi?query=*;sb=price;so=asc
search.cgi?query=*;sb=price;so=desc

Yes, that is what I wanted to know with regards to sorting but there are a couple of issues -

First, in the earlier thread it works fine the way I want but I have to enter either catname or query=something. It doesn't work if the query=blank or query=* itself and I think that is because the search.pm requires some input. Withe the earlier codes, it would be nice if the query is blank then it will return all listings which I can sort, but for the time being setting that aside the other issue is, below.

The sorting itself does not seem work well because of commas in the price values - hence, I thought we might need a global or something so it sorts the values ignoring the commas - in the future I plan to add a javascript in the form so users submit commas in price values, it will reformat before submitting the price value to the database.

For now, is it possible to run a sql query to remove commas from price values - and if so how?

Thanks!
Subject Author Views Date
Thread Allow sorting links dynamically by price via category.html and search.cgi socrates 7259 Mar 25, 2017, 7:55 PM
Thread Re: [socrates] Allow sorting links dynamically by price via category.html and search.cgi
Andy 7096 Mar 26, 2017, 6:30 AM
Thread Re: [Andy] Allow sorting links dynamically by price via category.html and search.cgi
socrates 7062 Mar 27, 2017, 11:18 PM
Post Re: [socrates] Allow sorting links dynamically by price via category.html and search.cgi
Andy 7036 Mar 27, 2017, 11:33 PM
Thread Re: [socrates] Allow sorting links dynamically by price via category.html and search.cgi
el noe 7035 Mar 30, 2017, 7:06 AM
Post Re: [el noe] Allow sorting links dynamically by price via category.html and search.cgi
socrates 6754 Apr 24, 2017, 9:07 PM