on 18/12/02 5:47 pm, Adam Voigt at [EMAIL PROTECTED] wrote:
> $searchstring = $_POST[searchfor];
> $searchstring = str_replace(" ","%",$searchstring);
> mssql_query("SELECT id FROM table WHERE field LIKE '$searchstring';");
I've modified my query to
$result = mysql_query("SELECT coursecode, title FROM courses WHERE title
LIKE '$tsearch' ORDER BY title",$db);
Where $tsearch is my search string.
I'm not getting any results from this though
What i am trying to achieve is to look in title and produce a result if the
so searching for 'Training Course" will find results like
Training Course 1
Training Course 2
Training Course n, etc.
Is LIKE the best way to do this or should i be using wildcards?
Managing Director - Brightstorm Ltd
Email >> [EMAIL PROTECTED]
Web >> http://www.brightstorm.co.uk
Tel >> 0117 9426653 (office)
07939 252144 (mobile)
Snailmail >> Unit 8, 14 King Square,
Bristol BS2 8JJ
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php