mini question
#1

Hey all, please can anyone help me on fixing this Query Syntax proplem...
Query Syntax 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 'WHERE `ip` = '127.0.0.1'' at line 1
Code:
PHP код:
          if (!mysqli_query($DB"INSERT INTO Protection (`path`, `verified`, `ip`) VALUES ('" .$_SERVER['PHP_SELF']. "', 'FALSE', `" .GetClientIP(). "`) WHERE `ip` = '" .GetClientIP(). "'"))
          { 
please some help...
Reply
#2

Insert queries can't have a where-clause ... ?!
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Insert queries can't have a where-clause ... ?!
tried this
Код:
UPDATE `Protection` SET `path` = '" .$_SERVER['PHP_SELF']. "', `verified` = 'FALSE', ip = '" .GetClientIP(). "' WHERE ip = '" .GetClientIP(). "'
and it works thanks sir
+repped
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)