I have a database with fields that contain JSON arrays. If I PDO select the row contents of one of these tables via straight PHP I can dump the data to the screen and it matches the database. Example:
$query = $database->prepare("SELECT * FROM modsettings
WHERE proj_id = ? AND mo = ? ORDER BY id DESC LIMIT 1");
$query->execute(array($proj["id"], 2));
$result = $query1->fetch(PDO::FETCH_ASSOC);
var_dump($result);
{"mid":"","module_id":"1" ......} // stripped excessive content
When I attempt this same with PhalconPHP I am greeted with garbage.
$result = Modulesettings::findFirst( array( 'conditions' => 'project_token = "' . $token . '"' , 'columns' => 'settings' ) );
var_dump($result->settings);
object(Phalcon\Mvc\Model\Row)#61 (1) { ["settings"]=> string(167) "{"text":"<\/a>
<\/a>
","class":""}" }
How would I get this raw string out of the table? All other data returns fine from all the other tables.
Thanks.