I am using a MySQL database with a stored serialized array, I want to pull records out of the database based on the serialized array. I have to be able to do this in the SELECT statement because I need to use the LIMIT feature in my pagination script.

Is this possible?

    If you ever have the urge to store an array in a field, then its time to create a new table (and store the array data one row at a time in the new table). This is because searching on serialized arrays is not easy or accurate or as accurate as searching a field for a specific value in another table. I'd recommend breaking the data out of the array and putting it into a new table. Then you could search that very easily.

      Write a Reply...