nadeemshafi9 Posted September 28, 2007 Share Posted September 28, 2007 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 Quote Link to comment Share on other sites More sharing options...
fenway Posted September 28, 2007 Share Posted September 28, 2007 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. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted September 28, 2007 Author Share Posted September 28, 2007 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 ????? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 28, 2007 Share Posted September 28, 2007 You can use FIND_IN_SET multiple times... or a SUBSTRING search with commas... it will be horribly slow. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted September 28, 2007 Author Share Posted September 28, 2007 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. Quote Link to comment Share on other sites More sharing options...
fenway Posted September 28, 2007 Share Posted September 28, 2007 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.