i am trying to save number of cents in MySql table as float , but the database is taking it wrong , for example i am saving 0.01, its saved as 0.1 !
is it possible to make this happen ?
My Code ;
$return["reward"] = 0.05;
$api->user['balance'] += $return["reward"];
$q = $api->pdo->prepare("UPDATE " . DB_PREFIX . "user
SET
balance = :balance
WHERE
userid = :userid");
$q->bindParam(":balance" , $api->user['balance'] , PDO::PARAM_INT );
$q->bindParam(":userid" , $api->user['userid'] , PDO::PARAM_INT);
the balance
column TYPE float in database.