$ in database results (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


marchlikjm -> $ in database results (8/24/2005 22:52:12)

I have a couple of fields in my form that are monetary. Is there a way to have all the monetary results be posted with a $ symbol in front of the number a user would enter in the field?

so if the field was "book Price" a user would enter 45.00 for $45. But in the results database there would be a $ in front of the number.

Thanks




dpf -> RE: $ in database results (8/25/2005 8:02:18)

if you want the value in the db to be a number (and thus be able to perform mathematical functions on it) you cant store $ as it isnt numerical but whenever you write out the values to be read you can add the $




marchlikjm -> RE: $ in database results (8/25/2005 18:09:52)

I don't need to do mathematical computations in the database. I just want all the fields that people input a price to display a $ sign in front of it in the database.




Spooky -> RE: $ in database results (8/25/2005 19:02:42)

Leave the $ figure out - when you display it to the user via a web page, you can add the $ then

eg :

$ <%=fp_field(fp_rs,"value")%>




marchlikjm -> RE: $ in database results (8/26/2005 12:43:43)

I got it to work. In the database resutls region I just simply placed a $ and space in front of the field like so:

$ <<bookprice>>

So now in the database all the entries in that field have a $ in front. Thanks.




dpf -> RE: $ in database results (8/26/2005 21:11:54)

quote:

I don't need to do mathematical computations in the database. I just want all the fields that people input a price to display a $ sign in front of it in the database.
have you considered that you might want to do something like:
show all records where price greater than 30

putting the $ in there means you cannot do that (or cant very easily)
take another look at spooky's answer - it is very simple to show the $ even if itisnt in the db




marchlikjm -> RE: $ in database results (8/27/2005 11:48:01)

ok, Thanks.[:D]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.03125