Ezilon.com - Target Your Audience, be Seen in Your Region

sql server currency query

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 26 posts

Joined: Nov 2001

I have converted a data type of a table (sql server database) to be smallmoney, but on entering any data, either directly into the database or via an input form, the £ sign is not displayed in the database and hence not on the web page.

eg. if i enter £20.50 it displays as 20.5

How can i change this to show as £20.50?

Thanks,
Mark

He has: 1,016 posts

Joined: May 2002

<?php
$money1
= 20.5;
$money2 = "£\" . number_format($money1, 2);
//Result: $money2 = £20.50
?>

Saeed Sarvi [ Email | Profile ]

They have: 26 posts

Joined: Nov 2001

Thanks, im using ASP, so i guess its a slightly different syntax,