I am currently working on something where i put a serialized array into mysql database.

I am putting in a numbers which correspond to id nums from another table.

Before without allowing for multiple selections it looked something like...

mysql_query("SELECT rm.*, sc.* FROM menu_items as rm, pages as sc WHERE rm.section='$id' AND sc.id='$id'");

But now so basically i want to be able to select what menu items are used for what page without doing a wide query then looping through hundreds of records.

I was wondering how i would go about doing it the simplest way?

(By the way it has to be in a serialize format...)

Thanks for any help

Let me know if you don't get what i mean .

Please note any kind of solution or way to do this would be great 😃 .

    Basically you wish to select rows by using data in serialized form as key to select rows? Does it really have to be in serialized format? Can't you use many_to_one relation tables instead?

    Because if you use serialized format, you have pure textual field, and you can attempt to use LIKE or full text search to select specific rows.

      Write a Reply...