{"email:required:email":"info@***.nl","profiel-info":"","instrument":"Orgel",
"instrument2":"Piano","login-updprof-btn":"Update Profile","picture":{"name":"","type":"",
"tmp_name":"","error":"4","size":"0"},
"upload":{"name":[""],"type":[""],"tmp_name":[""],"error":[4],"size":[0]}}
I wont say either one is better than the other, but different systems have different ways of doing things
What would be the answer to your question with Typo3?
$c = $modx->newQuery('modUser');
$c->innerJoin('modUserProfile', 'Profile');
$c->where(array(
'Profile.extended:LIKE' => '%instrument":"' . $search .'"%',
));
$c->select($modx->getSelectColumns('modUser','modUser'));
$c->select($modx->getSelectColumns('modUserProfile','Profile','profile_'));
foreach ($modx->getIterator('modUser', $c) as $user) {
$u = $user->toArray('', false, true);
var_dump($u);
}Typo3 is a different beastI wont say either one is better than the other, but different systems have different ways of doing things
What would be the answer to your question with Typo3?
As for MODX..
While you can use extended fields like that, it's not currently set up to allow easy filtering in the way you want it. It's merely a simple way to add extra information. I could come up with a hack-ish way to retrieve it... not sure if I'd recommend using it this way tho
$c = $modx->newQuery('modUser'); $c->innerJoin('modUserProfile', 'Profile'); $c->where(array( 'Profile.extended:LIKE' => '%instrument":"' . $search .'"%', )); $c->select($modx->getSelectColumns('modUser','modUser')); $c->select($modx->getSelectColumns('modUserProfile','Profile','profile_')); foreach ($modx->getIterator('modUser', $c) as $user) { $u = $user->toArray('', false, true); var_dump($u); }
It might be better to consider storing data like that in a custom table. http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components