Unstoppable Domains

SQL Question - Column Datatype

Spaceship Spaceship
Watch

boomers

Established Member
Impact
4
I've tried an integer column and a decimal column but whenever I try to input the figure '11.50' it automatically changes it to '12'.

I'm also using the SUM() function on these columns so using varchar or something similar isn't an option.

I cant see why my figure changes within an integer or decimal column.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
What does your PHP code look like?
 
0
•••
Just declaring the field as decimal is not enough, you need to provide scale/precision, example: decimal(6,2) makes room for 2 decimals.
 
0
•••
Just declaring the field as decimal is not enough, you need to provide scale/precision, example: decimal(6,2) makes room for 2 decimals.

This was indeed the problem, appreciate your reply :)
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back