0

I have some tables. picture

people_ids type is TEXT. No foreign keys used. main_id - is like main parent, one from PEOPLE table;

picture

I need SQL request to get result. SELECT * from families ...

[
  'main' => [
    'name' => 'John',
    'surname' => 'Brown'
   ],
  'people' => [
     [
      'name' => 'John',
      'surname' => 'Brown'
     ],
     [
      'name' => 'Merry',
      'surname' => 'Brown'
     ],
     [
      'name' => 'Lizy',
      'surname' => 'Brown'
     ]
   ]
]
  • 1
    [is storing a delimited list in a database column really that bad?](https://stackoverflow.com/questions/3653462/is-storing-a-delimited-list-in-a-database-column-really-that-bad) – Barmar Dec 11 '21 at 02:09

1 Answers1

0

Thanks for all, I'm dounded answer by the time)

Now I'm understanding that... that was maximally stupid idea. Learn more about SQL, table joining process and more.

  • Please don't add "thank you" as an answer. Instead, **[accept the answer](https://stackoverflow.com/help/accepted-answer)** that you found most helpful. - [From Review](/review/late-answers/32286007) – ahuemmer Jul 23 '22 at 11:39