Links to predetermined search pages

The Dave

New member
I'm curious if this is possible.

I have a datable of Artist's and Art Prints, and I was wondering if there was a way I could get a link on the top of the database that has something along the lines of: "Browse by last name: A B C D E F..."

I was wondering if there's any hyperlink I could use that would tell dadabik to automatically go to the page of results for last name starts with whatever letter the link is for.

It would be like sending the search through the link and bypassing the search page.
 

DebbieS

DaDaBIK Guru
Have a search through the forums for personalized query or custom query. This has been answered a couple of times.

 

The Dave

New member
Can you help me out with that thread?

I'm trying to run the query through a URL link, I don't want a drop down menu, and I quite don't understand the directions in that thread.

For example, my table name is 'print', the column I want to search through is 'last' and I'm looking for a link that will display the page for "starts with A".

(As in the link will show all last names starting with A from the table print.)

I'm not sure how to do it with what was posted in that thread.
 

DebbieS

DaDaBIK Guru
I don't know what post you're referring to. This post is the one I was thinking of which shows how to create links.

Using that example, I would create links like so (no line breaks -- only included here so you can see the spacing for the where_clause part):


&where_clause=last LIKE 'a%'&page=0">A


I tried using this where_clause in one of my installs and it worked for me.

 

The Dave

New member
I'm not sure I'm doing this right.

I'm trying to place that link in the header.php file.

I've tried various different alterings to make it work but everytime this is what happens.

The link shows up and points to:
http://www.brandywineworkshop.com/printsforsale/program_files/index.php?function=search&table_name=

And when clicked displays this:
[05] Error: you are attemping to manage a not allowed table.
 

DebbieS

DaDaBIK Guru
ooops ... just noticed an extra quote in the url sample I provided earlier. Remove the extra quote after table_name= ...

&where_clause=last LIKE 'a%'[/b]&page=0]A

 

nassausky

Member
Hmmm having problem with creating what I think might be an easy url.. Just want to be able to at least make a single url that can result in a listing of all the VIDEOS NAMES starting with the letter D.

Here is what I got so far

http://www.mywebsite.org/help/dad/?function=search&table_name=videos1&where_clause=%60videos%60.%60name%60+STARTS_WITH+%60B%60


hung up on the where_clause
and the format (delimiters)
and the starts_with function :(


Mike
 

nassausky

Member
OK found my solution with a little playing.. Would be nice if I found a good page with a bunch of searching examples.. :) If anyone has one please send a link .. Thanks


Here is my solution

http://www.mywebsite.org/help/dad/?function=search&table_name=videos1&where_clause=%60videos1%60.%60NAME%60+STARTS_WITH+%27%25D%25%27

Figured out that the query needs the LIKE operator something like this 'D%' which means find the letter D in a video followed by anything which is where the % comes into play which is the {%25} and the {%27} must be the character delimeter..... as so %27D%25%27
 

DebbieS

DaDaBIK Guru
Hmmmm ... I tried the URL I posted above in IE, FF and NN and it worked in each one. LIKE is the MySQL equivalent to STARTS_WITH. The URL format I posted works in all browsers without the use of additional % characters.

 
Top