直接给NULL就可以了 $sql="insert into test values('uu5','uu5',NULL)";这种确实可以。 不过我说的是这种情况,$a应该给什么值?$a的位置是自增ID。 $a; $sql="insert into test values('uu5','uu5',$a)"; 。
直接给NULL就可以了 $sql="insert into test values('uu5','uu5',NULL)";这种确实可以。 不过我说的是这种情况,$a应该给什么值?$a的位置是自增ID。 $a; $sql="insert into test values('uu5','uu5',$a)"; 。干嘛非要写个变量,有什么其他用途吗?
但 $tab_filed 参数没有传递的必要
因为 $insert_arr 应该是关联数组,关联键应为字段名
mysql里面给它空值是可以插入进去的,但是通过php插入是不行的。
直接给NULL就可以了
$sql="insert into test values('uu5','uu5',NULL)";这种确实可以。
不过我说的是这种情况,$a应该给什么值?$a的位置是自增ID。
$a;
$sql="insert into test values('uu5','uu5',$a)";
。
直接给NULL就可以了
$sql="insert into test values('uu5','uu5',NULL)";这种确实可以。
不过我说的是这种情况,$a应该给什么值?$a的位置是自增ID。
$a;
$sql="insert into test values('uu5','uu5',$a)";
。干嘛非要写个变量,有什么其他用途吗?