In the search resolute (search.cgi) page can I grab a column like "city" and get a list of all the cities that are in the resolute.
Jan 11, 2010, 6:13 AM
Veteran / Moderator (18436 posts)
Jan 11, 2010, 6:13 AM
Post #2 of 9
Views: 5209
You mean you want to get a list of results, with a specific city?
If your "City" field is called "City", then this should work:
search.cgi?query=*;City=Whatever
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
If your "City" field is called "City", then this should work:
search.cgi?query=*;City=Whatever
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Jan 11, 2010, 6:18 AM
Veteran / Moderator (18436 posts)
Jan 11, 2010, 6:18 AM
Post #4 of 9
Views: 5206
Oh mmm, not sure you can do that easily (due to the span pages etc)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Jan 11, 2010, 6:29 AM
Veteran / Moderator (18436 posts)
Jan 11, 2010, 6:29 AM
Post #6 of 9
Views: 5193
Not quite as simple as that, if you have more than one page of results :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Jan 12, 2010, 10:49 AM
User (175 posts)
Jan 12, 2010, 10:49 AM
Post #7 of 9
Views: 5161
Actually andy, you gave me a solution to this a few weeks ago... :) At least you pointed me in the right direction and I figured it out.
Its NOT 100% solution since its a permanent option, fields available or results available or not... But since most of the time there are search results, it almost works always.
Once the person searches for pizza, the URL would be:
http://www.medicosdeelsalvador.com/cgi-bin/medicos/search.cgi?query=pizza&Go=Buscar
This URL (in my site) gets displayed on the actual page using: <%escape_html query%>
So in the search results page, I added a "filter" jejejeje to that line and autolinked to it, such as:
<a href="http://www.mysite.com/cgi-bin/links/search.cgi?query=<%escape_html query%>&isCity=Miami">Only in Miami</a>
So that doesnt exactly filter what you searched, it researches all over again but this time using Pizza AND Miami and a parameter.
To take the person back to all results, the link would be the same with out the "&isCity=Miami" part, such as:
<a href="http://www.mysite.com/cgi-bin/links/search.cgi?query=<%escape_html query%>">Back to: <%escape_html query%></a>
Now, the only "bad" side to this methos is that I only filter out something like "Have Video" or "Have Pictures"... So I only have a few of those links, and they are ALWAYS available. You can leave it out optionaly if you use <%if query eq ....%> but depends on your site it may be too much to type out...
Hope that helped a little.
If youd like to see it working, PM me, Ill send you the URL.
Its NOT 100% solution since its a permanent option, fields available or results available or not... But since most of the time there are search results, it almost works always.
Once the person searches for pizza, the URL would be:
http://www.medicosdeelsalvador.com/cgi-bin/medicos/search.cgi?query=pizza&Go=Buscar
This URL (in my site) gets displayed on the actual page using: <%escape_html query%>
So in the search results page, I added a "filter" jejejeje to that line and autolinked to it, such as:
<a href="http://www.mysite.com/cgi-bin/links/search.cgi?query=<%escape_html query%>&isCity=Miami">Only in Miami</a>
So that doesnt exactly filter what you searched, it researches all over again but this time using Pizza AND Miami and a parameter.
To take the person back to all results, the link would be the same with out the "&isCity=Miami" part, such as:
<a href="http://www.mysite.com/cgi-bin/links/search.cgi?query=<%escape_html query%>">Back to: <%escape_html query%></a>
Now, the only "bad" side to this methos is that I only filter out something like "Have Video" or "Have Pictures"... So I only have a few of those links, and they are ALWAYS available. You can leave it out optionaly if you use <%if query eq ....%> but depends on your site it may be too much to type out...
Hope that helped a little.
If youd like to see it working, PM me, Ill send you the URL.
Jan 12, 2010, 10:55 AM
Veteran / Moderator (18436 posts)
Jan 12, 2010, 10:55 AM
Post #8 of 9
Views: 5156
Yeah, that would work - but I think he was wanting a list of the different cities (found in those results, on ALL the search pages for that query) ... not just hard-coded links.
It could be done, but would require something that would do the search again (on the first results page), and then store all the different "cities" found for that particular query. Not something thats very quick to do :(
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
It could be done, but would require something that would do the search again (on the first results page), and then store all the different "cities" found for that particular query. Not something thats very quick to do :(
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!