Need Your Assistance

Status
Not open for further replies.

toyin1204

New Member
Messages
5
Reaction score
0
Points
0
i got this error when i was trying to import my site please help me this the the error display


Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 1
STR: <?
SQL: <?
$IP = $HTTP_SERVER_VARS["REMOTE_ADDR"] ;


SQL query:

<? $IP = $HTTP_SERVER_VARS["REMOTE_ADDR"] ;

MySQL said: Documentation
#1064 - 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 '<?
$IP = $HTTP_SERVER_VARS["REMOTE_ADDR"]' at line 1
[ Back ]
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
367
Points
83
MySQL said: Documentation
#1064 - 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 '<?
$IP = $HTTP_SERVER_VARS["REMOTE_ADDR"]' at line 1
This is an issue with your code.

Raw PHP is being inserted into a MySQL query, which can't happen.
If you would like the community to try and help please provide the set of code which is related to this issue.
 

ellescuba27

Member
Messages
273
Reaction score
3
Points
18
PHP and MySQL are two different languages. To achieve what you are trying to do, which I assume to be insert the user's IP Address into a database, try
mysql_query("INSERT INTO [name of the table which isnt mentioned in the above post] (ip) VALUES $HTTP_SERVER_VARS['REMOTE_ADDR']");
 
Last edited:
Status
Not open for further replies.
Top