Connecting Tech Pros Worldwide Forums | Help | Site Map

ColdFusion and MySQL

Newbie
 
Join Date: Feb 2006
Posts: 1
#1: Feb 13 '06
I'm building a page where users can view an events page, however in my "Price" field, nothing shows up in the events page after I'm done inputting the data for that field on the back-end content management site. I've checked all my variables to make sure they correspond with the field name I defined in my MySQL table. The program is picking up the default value of "0.00" but as I said it won't pick up any other value I input on the client-side. I have the field type set to float (4,2). Any help would be MUCH appreciated, this has been torturing me for probably the better part of a week.

rameshsambu's Avatar
Newbie
 
Join Date: Oct 2006
Posts: 15
#2: Oct 17 '06

re: ColdFusion and MySQL


I think this can be solved by doing the following

in the mysql table change the price field datatype to double, put nothing for the length and 0.0 for default.

in the code to insert data into the price field use

insert into ... (, , price, ) values (
...,
....,
<cfqueryparam cfsqltype="cf_sql_double" value="#form.price#">
, ... )

try this and i think this will solve your headache
Reply