Hi

I have a database supplied to me that was excel but now uploaded to mysql.
(the data is out of my hands.)

i need to search for 1 of 2 categories against 3 fields with user inputted
data.

example Categories=Lessor , searchtype = BusinessCity searchdata = (user
input)

$sql = "SELECT * FROM Contacts WHERE Categories=\"$calltype\" and
$searchtype LIKE \"$searchdata%\"";

there are 2 Categories supplied via 2 different pages which load the same
form and use call to determine Category.

$searchtype is 1 of 3 text boxes against which searchdata is passed.

I need to get all columns hence the * but need $searchdata to try and match
all of text in the $searchtype column.

using the LIKE \"$searchdata%\" gets me only from start of test i.e. Fin
will find Financial from "Financial Text Widgets"
but not Financial from "Widgets Text Finance"

using php as my chosen language.

Mark



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to