numberformat coverting a variable containing 1,000 to a variable containing 1000

Hey folks,

A quick question to ask how i should:

pass a variable (number) in the url
extract it on another page and save it to a variable
do a database search on this variable and then bring back the details

My application works when the number is less than 1000 but once it gets to 1000 or more it trys to do a search on the database where ID = 1,234.

I have tried to convert this to  #numberformat(variable, 9999)# but it converts it to a random number somehow,

Any help would be much appreciated.

Cheers
jturkingtonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mosphatCommented:
Apparently you use formatting like 1,000 and your database needs it to be 1000. You can achieve that using #lsParseNumber(variable)#. Provided the locale is set to one that understands 1,000 (Like English (US))
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kkhippleCommented:
As mosphat pointed out you would use LsParseNumber liek so

LSParseNumber - http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functa38.htm#wp1109542
#LSParseNumber(LSNumberFormat(1234.5678, "_________"))#


you can also use numberformat to format the number to a certain locale but that's probably not what you are looking for
LSNumberFormat - http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functa34.htm#wp1109042
0
jturkingtonAuthor Commented:
Thanks guys that done the trick !
0
kkhippleCommented:
Glad I could help

cheers,
KDK
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.