Forum Moderators: coopster
I am have a table which contains recent search querys of another table.
I am tryng to output this data into a list so the user can click, and re-run a recent search...
The problem is that the table is full of duplicate searches from the same user.
How do I select the searches without retrieving duplicates?
SELECT id, term FROM project_term WHERE pid='$_SESSION[project_id]'
Also, would it make more sense to store all serches of a paricular user, or stop the insert if the record exists? Is there a way I can do this without performing 2 queries (ie adding some sort of LIMIT or other xeyword to the INSERT query?) I can't make the column unique because two users could perform the same search...)
Thanks!
Erik