MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Gordon Bruce Date:June 8 2005 7:30pm
Subject:RE: Are partial searches possible?
View as plain text  
You can try 

if($queryID = mysql_query("SELECT * 
                           FROM   WhInventory 
                           WHERE  Booking like ('%150000%')
                           ORDER BY Booking",$dbLink))

-----Original Message-----
From: Don [mailto:donpro@stripped] 
Sent: Wednesday, June 08, 2005 1:44 PM
To: mysql@stripped
Subject: Are partial searches possible?

Using MySQL 4.0.24 with PHP 4.3.11 

I have the following code: 

if($queryID = mysql_query("SELECT * FROM WhInventory WHERE
Match(Booking)
AGAINST ('" . mysql_escape_string($form['booking']) . "' IN BOOLEAN
MODE)
ORDER BY Booking",$dbLink)) { 

Which works fine if I have an exact entry but fails for a partial entry.
For
example. If I have an entry where "Booking" is 'TSIN150000' and I search
on
the string 'TSIN150000', it is found. 

How can I get it to find a partial match if the string I enter is only
'150000' ? 

Thanks, 
Don


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=1



Thread
Are partial searches possible?Don8 Jun
RE: Are partial searches possible?Gordon Bruce8 Jun
  • RE: Are partial searches possible?Don8 Jun
    • RE: Are partial searches possible?Don8 Jun
      • RE: Are partial searches possible?SGreen8 Jun
RE: Are partial searches possible?Jay Blanchard8 Jun
RE: Are partial searches possible?Jay Blanchard8 Jun