Jump to content

alphabetical filter


genu

Recommended Posts

For the letter you could do something like:

[code]
$letter = "A";
$query = "SELECT * FROM table WHERE field LIKE '$letter%'";
[/code]

Per query or do something like:

[code]
$letter = $_GET['letter'];
$query = "SELECT * FROM table WHERE field LIKE '$letter%'";
[/code]

And in your url have: http://www.domain.com/page.php?letter=A Or whatever the letter you want.

On the 30 items per page, you need to look into pagination.
Link to comment
https://forums.phpfreaks.com/topic/19848-alphabetical-filter/#findComment-86880
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.