Timeline for order by meta_value serialized array
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 18, 2013 at 5:17 | comment | added | s_ha_dum | It is interesting that you "cannot change the way the meta_value is being saved because [you are] using this plugin" but you can be sure about the structure of the data and that the structure won't change. That is a lot of the reason I said "no reliable way". If that plugin changes so might the array. Just be aware. | |
| Feb 18, 2013 at 5:10 | comment | added | KT. | In my case, I am sure about the structure of the array being created so I guess this should work okay. Thanks for looking into it. | |
| Feb 18, 2013 at 5:09 | vote | accept | KT. | ||
| Feb 18, 2013 at 4:43 | comment | added | s_ha_dum | I only glanced at that but it looks like it should work if your data is always in the same order in the serialized string. If some other value ever gets inserted into the string before the data you want that won't work. The author of that solution even states as much: "It does depend on the developer knowing how many columns are in the serialized data and the structure being the same." So, yes, I would have to say it could definitely cause problems in the future. | |
| Feb 18, 2013 at 4:30 | comment | added | KT. | Hi s_ha_dum! Thank you for your insights. I found a solution, which seems to work russellengland.com/2012/07/…. Do you think using substring_index will cause any problems in the future? | |
| Feb 17, 2013 at 16:33 | history | answered | s_ha_dum | CC BY-SA 3.0 |