suppose that array contents 10 items with a item name age as second item with value 10 it is stored in mysql array after serialization
Is it possible to update that age inside serialized mysql query directly with OUT THESE STEPS(one way can be this) select serialize data from database unserialize it change array then again serialize then update
eg serialize data somhing like this
a:23:{i:10000011;a:5:{s:15:"social_users_id";s:8:"10000022";s:10:"friends_id";s:8:"10000011";s:8:"relation";s:1:"1";s:6:"status";s:1:"0";s:4:"html";s:41:"Pradeep Kumar has update profile picture.";}i:10000015;a:5:{s:15:"social_users_id";s:8:"10000022";s:10:"friends_id";s:8:"10000015";s:8:"relation";s:1:"6";s:6:"status";s:1:"0";s:4:"html";s:41:"Pradeep Kumar has update profile picture.";}i:10000016;a:5:{s:15:"social_users_id";s:8:"10000022";s:10:"friends_id";s:8:"10000016";s:8:"relation";s:1:"3";s:6:"status";s:1:"0";s:4:"html";s:41:"Pradeep Kumar has update profile picture.";}i:10000018;a:5:
OR Array
[10000015] => Array
(
[social_users_id] => 10000022
[friends_id] => 10000015
[relation] => 6
[status] => 0
[html] => Pradeep Kumar has update profile picture.
)
[10000016] => Array
(
[social_users_id] => 10000022
[friends_id] => 10000016
[relation] => 3
[status] => 0
[html] => Pradeep Kumar has update profile picture.
)
I want to select and update 'status' index of the array '10000015' I have use longtext datatype of the coloum of the table.
I want to first search that status index and after that update, can we d with query Or I have to use PHP code for this..
can it be shorter than that? if we just want to unpdate 1 thing there was many waste there(unnessary queries,updates)...espcially if array is large
plus how can an we do age search with out deserialization?(possible?)
any ideas... thanks