diff options
Diffstat (limited to 'all.php')
-rw-r--r-- | all.php | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -63,12 +63,16 @@ function report ($db) if (substr($what, 0, 1)=='%') { + $l = substr($what, 1, 1); + if (!ctype_alpha($l) && !ctype_digit($l)) { + $l = 'a'; + } $sql = sprintf( "SELECT DISTINCT name FROM rpm - WHERE SUBSTRING(name,1,1) = %s + WHERE NAME LIKE '%s%%' ORDER BY name", - $db->quote(substr($what, 1, 1)) + $l ); } else { $sql = sprintf( @@ -243,4 +247,4 @@ $page_content = $smarty->fetch('all.tpl'); $smarty->assign('page_content', $page_content); $smarty->display('main.tpl'); -?>
\ No newline at end of file +?> |