Connecting Tech Pros Worldwide Help | Site Map

ColdFusion and MySQL

  #1  
Old February 13th, 2006, 02:53 PM
Newbie
 
Join Date: Feb 2006
Posts: 1
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.
  #2  
Old October 17th, 2006, 07:42 AM
rameshsambu's Avatar
Newbie
 
Join Date: Oct 2006
Posts: 15

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
coldfusion mysql error windsorben answers 3 January 11th, 2008 04:08 PM
how to connect coldfusion and mysql... need db first asnyder131 answers 1 December 11th, 2006 09:25 AM
how do i create a mysql database from a "script" asnyder131 answers 0 September 18th, 2006 03:35 AM
MySQL crashes (sometimes) on large query Matt Weakly answers 0 July 20th, 2005 12:33 AM
MySQL crashes (sometimes) on large query Matt Weakly answers 0 July 20th, 2005 12:33 AM