navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

$ in database results

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Microsoft FrontPage Help >> $ in database results
Page: [1]
 
marchlikjm

 

Posts: 33
Joined: 8/9/2005
Status: offline

 
$ 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

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
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 $

_____________________________

Dan

(in reply to marchlikjm)
marchlikjm

 

Posts: 33
Joined: 8/9/2005
Status: offline

 
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.

(in reply to dpf)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
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")%>

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to marchlikjm)
marchlikjm

 

Posts: 33
Joined: 8/9/2005
Status: offline

 
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.

(in reply to Spooky)
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
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

_____________________________

Dan

(in reply to marchlikjm)
marchlikjm

 

Posts: 33
Joined: 8/9/2005
Status: offline

 
RE: $ in database results - 8/27/2005 11:48:01   
ok, Thanks.:)

(in reply to dpf)
Page:   [1]

All Forums >> Web Development >> Microsoft FrontPage Help >> $ in database results
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts