I am using this query to find particular items.
What I want to do is change it to something like this:Code:$result = @mysql_query("SELECT * FROM submission WHERE day = '$subday' AND month = '$submonth' AND year = '$subyear'"); if (!$result) { die('<p>Unable to locate database. Script is at search level.</p>'); }
The problem I have is that as above I want to search the database where the field subtext is equal to $subsearch. If the text is the same for both then it will return the results which is fine.Code:$result = @mysql_query("SELECT * FROM submission WHERE subtext = '$subsearch'"); if (!$result) { die('<p>Unable to locate database. Script is at search level.</p>'); }
The simplest way to explain is that I want to seach for any entry that contains the value of $subsearch but not an exact match.
*$subsearch* - no matter what is before or what is after.
Does that make sense?
Lee



Bookmarks