0

Hi I am trying get a query to join 2 tables and a result on the information in both. At the moment I have the following

$query = "SELECT * FROM TABLE1, TABLE2 Where 'TABLE2.field1' LIKE '%TABLE1.field2%'";

The problem is TABLE2 has a field with names in but TABLE1.field2 has |name|name|name| and so on. |=TAB

So im struggling for the query to find a match in there somewhere.

Can anybody suggest anything please

Thanks

2
Contributors
5
Replies
10
Views
4 Years
Discussion Span
Last Post by mpc123
0

It's a shame you use tabs. If you use comma's instead you'd be able to use FIND_IN_SET() (assuming you use MySQL).

0

I can change it to commas, so how would work with FIND_IN_SET() please

0

Hi

I have changed to comma rather than tab and the query now works perfect, thanks for your help

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.