MySQL int fields -> php strings |
[eluser]michaelUFL[/eluser]
Further investigation leads me to believe that this is not a codeigniter issue. Using the MySQL connector directly gives the same results ... see below. I have posted a message to [email protected] Michael ---- $sql = 'SELECT intField, 1+1 AS two, COUNT(*) AS count FROM testtable WHERE intField=1'; $query_results = mysql_query($sql); $object = mysql_fetch_object($query_results); var_dump($object); echo json_encode($object); --> object(stdClass)#1 (3) { ["intField"]=> string(1) "1" ["two"]=> string(1) "2" ["count"]=> string(1) "1" } {"intField":"1","two":"2","count":"1"} |
Messages In This Thread |
MySQL int fields -> php strings - by El Forum - 09-16-2010, 11:01 AM
MySQL int fields -> php strings - by El Forum - 09-16-2010, 11:53 AM
MySQL int fields -> php strings - by El Forum - 09-16-2010, 12:42 PM
|