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.
我已经将这个简单的插入到数据库中,但不幸的是,如果没有任何内容插入到字段中,则 DB 中的默认值 N/A 将被空值覆盖。下面是插入代码,我怎样才能让它保持 N/A?
$insertSQL = sprintf("INSERT INTO application_forms (application_type) VALUES (%s)", GetSQLValueString($_POST['application_type'], "text"));
测试它是否为空,如果是,请不要插入。