Jump to content

everstudios

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

everstudios's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for replying. That code says that money_format is an undefined funtion. is that suppose to be number? I just read up on money format and it doesnt not work with windows servers. I am on a windows platform. Any ideas?
  2. Thanks for replying, the code you gave me converted the number into a currency but the SQL insert code is still not accepting it for a Money field. Do you have any other ideas. The error i am getting is: Warning: mssql_query(): message: Disallowed implicit conversion from data type varchar to data type money, table 'camft.dbo.Activity', column 'AMOUNT'. Use the CONVERT function to run this query. (severity 16) in C:\Inetpub\vhosts\camftads.com\httpdocs\mssql\7.php on line 578 So i need to use the convert funtion in SQL, but i don;t know how to use that in the code i gave above. Thanks
  3. Hello Everyone, I'm having trouble Inserting a variable into a 'money' feild. i am passing a variable allong called $total. WHen it comes time to insert into my database, i use [code] $result = mssql_query(" INSERT INTO $Table_Activity ( SEQN, ID, ACTIVITY_TYPE, Product_code, TRANSACTION_DATE, DESCRIPTION, NOTE, UF_1, UF_2, EFFECTIVE_DATE, THRU_DATE, AMOUNT, ACTION_CODES) VALUES ( '$seqn', '$id', 'ADS', '$newarray[$insertcount], WEB', '$inserttoday', '$category', '$class_city. $class_ad', '$class_city', '$cardtype', '$inserttomorrow', '$insertnextmonth', '$total', '$words')"); [/code] when i do that, i get an error because the AMOUNT feild is a Money Type and my variable is not. My Question is how do i convert my $total variable into something that the money feild will accept. I tried reading up on the CONVERT funtion for SQL, but not getting far wtih it. Is there an easy way to do this?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.