Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 sql 数据库,我想在其中保存值
在名为 credit in 的列中为正
在称为贷方的列中为负数
有什么方法可以让 php 检测到该值是肯定的我知道该怎么做只是告诉我怎么说 php
if(value == +ve){ //做这个 }else{ //做这个 }
if( $value >= 0) { // It's positive (or equal to zero) } else { // It's negative }
要测试阳性:
if(value>=0)
if(value > 0){ // do this } elseif(value < 0){ // do that }