Jump to content

Newbie question


Relaxer

Recommended Posts

Hi, im making a small inventory using mysql. In my $price i choose decimal and 10,2 in the length.

 

My interface is made in HTML code.

 

The problem is when i input the price, the data is not shown in the db. all it shows is the default 0.00. Help me please.. Thanks in advance

Link to comment
Share on other sites

How do you proceed for your Insert queries ?

 

You should have something like:

INSERT INTO `table`

(`field`) 

VALUES

(\'5\');

If `field` is a decimal field and has a length of 10,2 this will insert value 5.00 into the database. In MySQL, even if you place values between \', values will be converted to the right format. Also, be sure to use the \".\", not the \",\" to separate the decimal part from the integer part.

 

JP.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.