codetard Posted November 13, 2006 Share Posted November 13, 2006 i am using a joomla component called estate manager. part of the display shows how many rooms a house has. the developer coded it so that this field is a interger. I need it to be a decimal becuase where I live, the room numbering system accounts also for 'half rooms' ex. 5.5 rooms.well i logged in phpmyadmin, and changed the field type to 'decimal' and set it to 10,1probblem is though, when i enter 5.5. in the admin of the application, it does not save correctly. it always saves as 5.0also i tried to enter 4.5 and it saved as 4.0I also then edited the data directly in phpMyAdmin, and it saved and displays fine as 5.5. in the frontend.any tips for me? Link to comment https://forums.phpfreaks.com/topic/27090-decimal-issue-cant-seem-to-save-to-db/ Share on other sites More sharing options...
codetard Posted November 13, 2006 Author Share Posted November 13, 2006 ah nevermind, the n00b answered his own question: /* $obj->rooms = intval(mosGetParam($_POST,'rooms',0)); */ $obj->rooms = doubleval(mosGetParam($_POST,'rooms',0.00));peace Link to comment https://forums.phpfreaks.com/topic/27090-decimal-issue-cant-seem-to-save-to-db/#findComment-123871 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.