1

I have query like this

SELECT * FROM table WHERE id ='1'

but in column id store data like this

array (size=2)
   0 => string '1' (length=1)
   'id' => string '1' (length=1)
array (size=2)
   0 => string '1,2' (length=3)
   'id' => string '1,2' (length=3)
array (size=2)
   0 => string '1,2,3' (length=5)
  'id' => string '1,2,3'

Result of my query is show only 1 row but what I need is show every row that has value 1 in it.

plz help me with it

1

2 Answers 2

1

I think you can use LIKE %% to achieve this

SELECT * FROM table WHERE id LIKE '%1%'
Sign up to request clarification or add additional context in comments.

1 Comment

I need real value not probably value
0

Pull from the table as the current data, then:

 $NewArr = array();
 foreach ($Array as $values){
      $NewArr[] = (int) @values;

 }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.