Jump to content

Building search for MySQL and need help with Query


$username

Recommended Posts

Hello Everyone,

    I am trying to build a query to search my tables. What I am getting is it will find all of the info from all fields  and then when I out put it in PHP it will show up as many times as it found it in the same table field.

 

So here is example

First Name | LastName | email|

Timmy      | Billy        | [email protected]

__________________

So when I search it shows the same search 2 times

I need to know if there is a way to restrict the search so it does not show 1 column 2 times when it searches? Or is this something I have to do in PHP?

$query213 = "SELECT * FROM `tdb_` . `contacts`, `tdb_` . `account` WHERE ( contacts.ContactFname LIKE
CONVERT( _utf8 '%$trimmed%' USING latin1 ) COLLATE latin1_swedish_ci OR contacts.ContactLname LIKE 
CONVERT( _utf8 '%$trimmed%' USING latin1 ) COLLATE latin1_swedish_ci OR contacts.ContactPhone LIKE)"

 

Thanks for any help

Brett

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.