How can I search in a coloumn from table in database 2 different recordings and display them in a html table?
My table looks like this:
-|----|----|--|
1 text text A
2 text text B
3 text text A
4 text text C
5 text text B
and I want to search only the recordings with contains A and B, like this:
-|----|----|--|
1 text text A
2 text text A
3 text text B
4 text text B
Multiple search option.
Moderator: General Moderators
- ReverendDexter
- Forum Contributor
- Posts: 193
- Joined: Tue May 29, 2007 1:26 pm
- Location: Chico, CA
I know that displaying a resultset from a database has been posted elsewhere before, so I'll only address the two items from the column bit.
You can do this with a OR clause in your sql statement, i.e.
Hope that helps!
EDIT: I didn't see you wanted it ordered, so I fixed the query to do that
You can do this with a OR clause in your sql statement, i.e.
Code: Select all
SELECT *
FROM table
WHERE app_column = 'A'
OR app_column = 'B'
ORDER BY app_column
EDIT: I didn't see you wanted it ordered, so I fixed the query to do that