close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Price display in results and detail pages

Thread began 12/12/2011 10:06 am by bill3786 | Last modified 12/12/2011 2:51 pm by bill3786 | 687 views | 2 replies |


Price display in results and detail pages

I'm using the free mysql database where the price column type is defined as float.

All the prices in the database have been stored in the database (using phpmyadmin) in sterling as £x.xx but where prices have been entered as say £15.00 or £15.50 the prices displayed on the results and detail page will display as £15 or £15.5 respectively.

Prices which have been entered as say £15.25 are displayed correctly on both the results and detail pages. All prices are correctly shown in ecart because the ecart object has been set to 2 decimal places with force decimals selected.

After some research it seems that the price column could be set as Decimal with a length of 10,2 where 2 indicates the fractional part of the number. Is this the correct way to display the prices corectly or is there a setting in dataassist to achieve it.

Sign in to reply to this post

Ian S

Hi Bill,

So are the numbers being stored correctly in the DB, and just displaying incorrectly on the screen?

If the value is correct in your database you could try writing it out to screen using the number_format command with PHP.


<?php echo number_format($row_rstable['currencyfieldname'],2,'.',','); ?>

Where rstable is your recordset name and currencyfieldname is the name of your database field.


Sign in to reply to this post


Hi Ian

Thanks for the reply, I tried your suggestion and it returns the price to two decimal places.


Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...