PHP Build and order an array of objects stored as JSON on a database -


i have objects stored in json_encoded format in database, in text field.

i want build array of these objects, , order them based on property called "order".

the objects properties defined on class:

class task {  public $id; public $title; public $details; public $order; public $high_priority; public $done;  } 

the objects stored in table following columns:

id, title ,data

so, whole objects represented class task gets encoded , saved in data field, title task

i need load objects title task database, map id field task's id property, put them in array of objects, order them according property order of objects

what best way that? appreciated.

unless nosql db type, best way not store data in json format.

look @ manipulation want , easier make sense of data if stored each value in own field.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -