Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query tables using A B C D ... links 1

Status
Not open for further replies.

casabella

Programmer
Aug 30, 2007
59
US
I have successfully written a data grid table in PHP where I allow user to view 50 rows per page. I show links like one normally sees Prev 1 2 3 4 5 6 ... Next to jump from page to page.

I want to use A B C D E F ... to allow user to go directly to a group of records where KEY starts with chosen link letter.

I can write the PHP code I just do not know the mySQL query to search for KEY that starts with 'A' or 'B' or 'C' ...

Using LIKE comes to mind but I am filled with doubts about it and so I figure I ask for your assistance.

Regards,


Jose
 
Code:
WHERE LEFT(yourcolumname,1) = 'F'

also

Code:
WHERE yourcolumname LIKE 'F%'
 
guelphdad,

Thank you for such prompt response.


Jose
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top