0

Why i have this 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 '22:59:45,5.122.42.79,logged in to BanTools)' at line 1 [1064]

@$log = "1";
$act = "logged in to BanTools";
$a = "Ramin";

if($log == "1" ) { 
$visit = Array(
'username'     => $a,
'ctime'         => date("Y-m-d H:i:s"),
'ip_address'   => $_SERVER['REMOTE_ADDR'],
'action'       => $act
);

$sql = "INSERT into act_log (".join(',', array_keys($visit)).") VALUES (".join(',', array_values($visit)).") ";

$db->sql_query($sql);  
$db->sql_close();
}
Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119
MaxDome
  • 43
  • 3

0 Answers0