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

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).

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

wow thanks thats great, will try it now

Hi

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.