In the php database, what type is the additional temperature (°c) field displayed on the page = what settings are needed?

Source: Internet
Author: User
Tags php database
In the php database, what is the type of the temperature Celsius field added? displayed on the page = What are the settings required? php & nbsp; what is the field type of the temperature Celsius field added to the database table? & nbsp; when the page is displayed at °c (for example,-1 ℃ ~ 8 ℃) do you need any settings? isn't it a character ?, When you use int storage, you can add the temperature "°c" and "php" to the database. What type of "°c" field is displayed on the page? = what settings are needed?
Php adds a field of temperature degree Celsius to the database table. what is the field type? when the field type is displayed on the page, such as-1 degree Celsius ~ 8 ℃) do you need any settings?
------ Solution --------------------
Cannot it be a character?
------ Solution --------------------
You can use int to store
Add ℃ to the display.
------ Solution --------------------
If the field content contains "℃", The varchar type is used.
Otherwise, both int and varchar can be used.

°C is only a character.
$ A =-1;
$ B = 8;
Echo "{$ a} ℃ ~ {$ B} ℃ ";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.