当前位置:Gxlcms > PHP教程 > 这个SQL串接,错哪了啊

这个SQL串接,错哪了啊

时间:2021-07-01 10:21:17 帮助过:21人阅读

这个SQL串接,哪里错了啊..
$nql = "INSERT INTO `dh_xxx` (`email`,`tel`,`upass`,`unick`,`sri`,`sex`,`photo`,`add`,`sgao`,`xli`,`xlit`,`ysru`,`ysrid`,`sxiao`,`xzuo`,`zwjsao`,`hyzkuang`,`addip`,`addipt`,`mck`) VALUES ('". $email ."','". $tel ."','". mysql_real_escape_string($upass) ."','". mysql_real_escape_string($unick) ."','". $sri ."','". $sex ."','". $photo ."','". $add ."',". $sgao .",". $xli .",'". $xlit ."',". yxin .",'". yxint ."','". $sxiao ."','". $xzuo ."','". mysql_real_escape_string($zwjsao) ."','". $hyzkuang ."','". getIPaddress() ."','". getIPS138(getIPaddress()) ."',". $site["examine"] .")";

求高人看看
------解决思路----------------------
mysql_query($nql) or die(mysql_error()); 执行一下不就知道了
------解决思路----------------------
...,". yxin .",'". yxint ."...

这是什么?
如果是常量,那么值是多少
------解决思路----------------------
是变量为什么没有 $ ???
------解决思路----------------------
只要是字符类型字段,都应该在值外面加上引号。
echo $nql; 看看是什么

人气教程排行