Why does my float store in MYSQL as .9999 when it's greater than 1?
问题 I'm storing process time in a MySQL database as a float(4,4). $start_time = microtime( TRUE ); // things happen in my script $end_time = microtime( TRUE ); $process_time = $end_time - $start_time; // insert $process time into mysql table $process_time always displays correctly when outputted to the command line, but if it's value is greater than 1, it stores into mysql as .9999. What gives? 回答1: float(4,4) means total 4 digits, 4 of them are after the decimal point. So you have to change to