newbie sql select question

wxdqz

New Member
I've created a link (../file.php3?category=dealers&topic=ford), passing these two variables to a SELECT:

SELECT ... FROM ... WHERE CatName='$category' AND TopicName='$topic' ....

This works fine to list all entries for topics in that category, but can I use this SELECT to list all entries (regardless of topic) for the category? I know that eliminating the topic variable from the link wont work. What will?
 
Back
Top