Author: danydb
Date: 2011-06-06 23:30:08 +0200 (Mon, 06 Jun 2011)
New Revision: 4159
Modified:
phpcompta/branches/rel560/dev/manage-code/create-file/create_phpclass.py
Log:
bug fixed : settype transform SQL NULL into 0
Modified:
phpcompta/branches/rel560/dev/manage-code/create-file/create_phpclass.py
===================================================================
--- phpcompta/branches/rel560/dev/manage-code/create-file/create_phpclass.py
2011-06-06 19:30:08 UTC (rev 4158)
+++ phpcompta/branches/rel560/dev/manage-code/create-file/create_phpclass.py
2011-06-06 21:30:08 UTC (rev 4159)
@@ -544,7 +544,7 @@
col_id=col_id.strip()
col_type=col_type.strip()
if col_type in ('float','integer','numeric','bigint') :
- verify_data_type+="if ( settype($this->"+col_id+",'float')
== false )\n \
+ verify_data_type+="if ( $this->"+col_id+"!== null &&
settype($this->"+col_id+",'float') == false )\n \
throw new Exception('DATATYPE "+col_id+" $this->"+col_id+" non
numerique');\n"
if col_type in ('date',' timestamp without time
zone','timestamp with time zone'):
verify_data_type+=" if (isDate($this->"+col_id+") ==
null )\n \
_______________________________________________
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev