troubleshooting Question

Data Types in MySql to avoid negative numbers

Avatar of ecperi58
ecperi58 asked on
Databases
6 Comments1 Solution783 ViewsLast Modified:
Hi,

I am working with MySQL and PHP in Dreamweaver (thus not very experienced). I have a database I have set up that allows the user to enter in formation in a series of fields. Some fields they enter will be a number between 1-100 and other fields will be currency totals.

I would like to avoid the entry of negative numbers. How would i define the data fileds for this?

And lastly, do they need to enter the currency in decimals? Or can they just enter 1000 for 1000.00

I've got all fields related set to Int except for the currency fields where I am using Decimal(10,0)

Thanks
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros