What's wrong with this SQL concatenation? $ nql = "INSERT INTO 'DH _ XXX' ('email ', 'Tel', 'upass ', 'unick', 'sri ', 'Sex', 'Photo ', 'Add', 'sgao', 'xlil', 'xforward', '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. ",'". $ XREF. "',". yxin. ",'". yxint. "','". $ sxiao. "','". $ xzuo. "','". mysql_real_escape_string ($ zwjsao ). "','". $ hyzkuang. "','". getIPaddress (). "','". getIPS138 (getIPaddress ()). "',". $ site ["examine"]. ")";
Look for someone else
Reply to discussion (solution)
Mysql_query ($ nql) or die (mysql_error ()
..., ". Yxin.", '". yxint ."...
What is this?
If it is a constant, what is the value?
Mysql_query ($ nql) or die (mysql_error ()
The following error is prompted: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
What is it? I'm a little bit PHP. please give me some advice.
..., ". Yxin.", '". yxint ."...
What is this?
If it is a constant, what is the value?
These are variables with single quotes and values. they are non-numeric variables, but not numeric variables.
Is the variable $ ???
Is the variable $ ???
I added it now or reported the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
GetIPaddress () getIPS138 () is the function.
$ Site ["examine"] $ site is a globally defined variable.
After I insert and delete these three variables, it will be normal. isn't it possible to directly call functions and global variables in the concatenation?
All character fields should be enclosed by quotation marks.
Echo $ nql;