I am guessing this has came up before, but I couldn't find the answer to my question. Here is a little code snippet:
$stmt = $this -> db -> query("
SELECT
`Field`
FROM
`Table`
WHERE
(`ID` = 33608)");
var_dump($stmt -> fetch());
And this is the result I get:
array(1) { ["Field"]=> float(1.7999999523163) }
However, the data in the MySQL database is 1.8. The type of the field is float(7,4). $this->db is a PDO object.
I have recently migrated to PDO (from AdoDB), and this code was working fine before. I am not sure what went wrong here. Could you point me in the right direction?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…