|
Posted by thehuby on 02/13/06 18:17
I think that using implode/explode would be the best way as this means
you can use native SQL to search the database (WHERE array_col LIKE
'%2%' or whatever), rather than having to comparison check each
serialised object by pulling the data out, transforming, doing an array
lookup etc.
Quite a clever way of doing it actually!
The other way of doing it would be to use SQL 'properly' and use a
table for whatever the array numbers of reference (I am assuming a PK
on another table or an index in an array), then using SQL to search
through the whole thing.
Either way, avoiding serialization will allow you to port the language
at a later date to another language (ASP, JSP etc.). Not something you
might be thinking of right now but it could be useful.
Navigation:
[Reply to this message]
|