You don't need to create temp tables to hold the distinct results.
You can just add DISTINCT to your query, for the field that you want to be distinct.
$sql = "SELECT DISTINCT(field), * FROM paid WHERE title LIKE '$alph%' ORDER by asc";
where field is the one you want distinct.
The GROUP BY clause will also serve the same purpose.
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
Offline 1,250 posts
since Sep 2005