Fai tutto nella query:

Codice PHP:
$query "select * from tabella WHERE nome LIKE 'a%'"