Wednesday, 28 November 2018

i have a problem with selecting some data from mysql database both side CSV

i have both side coma seperated values like

 $ing=1,2,3,4,5,6

and the database has a table with values

 IDS    5,2,1,6,2,3,45 // in database

i know this is not a good practice but i had to do this to get the values in one query. i also have a seperate table where the IDS are seperate and corrosponds to seperate users like

  user 1    IDS 2 
  user 3    IDS 65 etc 

As of now i am using

 $conditions[] = "CONCAT(',', `rcring`, ',') REGEXP ',($ing),'";

it gives me good results but it gives me the values in which either of the $ing exists i want only the tables which has atleast all the $ing

can you help me please i tried my work and i cant get a proper solution anywhere . thankx .



from i have a problem with selecting some data from mysql database both side CSV

No comments:

Post a Comment