Hey guys, I need help. My mysql query allows me to say:
SELECT cca_id AS id, cca_title AS text,IF((SELECT count(*) from crm_categories WHERE cca_id_prev = id),'TRUE','FALSE') AS children FROM crm_categories WHERE...
now i get the array back with true / false as a string
If I use json_encode, the result will be like {"id":"false"}
but I need true / false without quotes - the problem is that I use true false in the mysql query as a boolean that returns 0/1, but I don't want that ...
Of course, I can run str_replace on a json string - but I think there are alternatives, right?
json php mysql
sintakonte
source share