This may well be a very simple problem, but it's proving to be a stumbling point for me. I have two tables that I want to query. They contain the following columns:
user_id (primary key)
user_name (primary key)
post_id (primary key)
Both columns in the USER table have been given primary key status (is this allowed?) because user_id is an automated integer and I can join the 2 tables by using POST.user_name as a foreign key to the USER.user_name primary key.
I would like an SQL statement that can do the following:
- When a person enters a string (in this case a full URL), it filters the recordset by only selecting data with the same URL. So something like this perhaps....
WHERE POST.post_url LIKE 'colname'
( colname = $_GET['SearchString'] )
- Returns the remaining set of USER.user_name and USER.user_id values.
I hope I've included enough information so some of you can suggest some help.