Jump to content

can JOIN be done using a LIKE


nadeemshafi9

Recommended Posts

i have a JOIN that i need to make, except the writer of the db has usied an unconventional way of ralation, EG. one feild one cell contains many id's (,1,10,3,)

 

so i need to do somthing like this

 

SELECT * FROM a JOIN a.id ON b.linkids WHERE a.id LIKE % b.linkids %

 

is this even possible and can somone correct me

Link to comment
https://forums.phpfreaks.com/topic/71033-can-join-be-done-using-a-like/
Share on other sites

i have a JOIN that i need to make, except the writer of the db has usied an unconventional way of ralation, EG. one feild one cell contains many id's (,1,10,3,)

 

so i need to do somthing like this

 

SELECT * FROM a JOIN a.id ON b.linkids WHERE a.id LIKE % b.linkids %

 

is this even possible and can somone correct me

 

How does everyone fall into this trap?  Get the "writer of the db" to normalize the database.

i have a JOIN that i need to make, except the writer of the db has usied an unconventional way of ralation, EG. one feild one cell contains many id's (,1,10,3,)

 

so i need to do somthing like this

 

SELECT * FROM a JOIN a.id ON b.linkids WHERE a.id LIKE % b.linkids %

 

is this even possible and can somone correct me

 

How does everyone fall into this trap?  Get the "writer of the db" to normalize the database.

 

i told him but he refuses normalisation, its my job to optimise the the search engine, i know it should be normalised, there a hell load od data on the db and the search engine is sophisticated, is there aanyway we can solve this ?

 

right now all the records in the majour table are selected then all the records from the other tables are put into an array and continuously searched for each record of the big table in order to find any matches on the query in the search bar in aby tables but preserve relation ?????

im gona try your method first, but normalisation and re programming is under way for one table and will reult in the whole thing being virtualy re writen i told him just leave it, i cant belive tehy have such a big databse with such unsafe design and compleetly no normalisation, fudge it well have to get it done, thanks for the tipsim gona try them now any more info welcome.

im gona try your method first, but normalisation and re programming is under way for one table and will reult in the whole thing being virtualy re writen i told him just leave it, i cant belive tehy have such a big databse with such unsafe design and compleetly no normalisation, fudge it well have to get it done, thanks for the tipsim gona try them now any more info welcome.

 

You could also make a copy of this table and normalize it for the purposes of what you're trying to accomplish.

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.