[FX.php List] Problem storing floats in MySQL table

Wouter Moerdijk wouter.moerdijk at gmail.com
Fri Mar 14 05:21:32 MDT 2008


Hi,

I using FX to access both a FM and a MySQL DB. I am trying to store some
data in a MySQL table. All is fine as long as the MySQL table only has
varchar or text fields. The problem I am running into happens when I try to
use fields of numeric types like float, double, integer etc. As soon as I
post an empty field of these type FX throws an error. I have a quick fix
where I alway add a "0" to the number,

e.g.
$db->AddDBParam('nr',$_REQUEST['nr']+0);

But off course this will store a "0" in stead of a NULL in the db. How do I
handle this?

W.
-- 
<img src="http://gsig.brightdev.com/3/Wouter.Moerdijk.png">
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20080314/5eeb8fd9/attachment-0001.html


More information about the FX.php_List mailing list