这个SQL串接,错哪了啊

WBOY
Release: 2016-06-13 12:20:14
Original
867 people have browsed it

这个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;  看看是什么

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!