Re: Re: Why Can't I get this to work

From: Date: Mon, 30 Jun 2003 14:50:40 +0000
Subject: Re: Re: Why Can't I get this to work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-153413@lists.php.net to get a copy of this message
On Jun 28, 2003, "Ron Clark" claimed that: |OK, normally I do not respond to my own posts, but I have been shown that I |did not get the whole script. So here it is: | |for ($i=0; $i<$number_of_alerts; $i++) { | |// Split each line | |$line = explode(" ", $ipfwlog[$i]); | |$line[1] = intval($line[1]); | |$IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel, |fw_engine, rule_number, action, protocol, src_ip_port, dst_ip_port, |direction, via, interface) VALUES ('$line[0]', '$line[1]', '$line[2]', |'$line[3]', '$line[4]', '$line[5]', '$line[6]','$line[7]', '$line[8]', |'$line[9]', '$line[10]', '$line[11]', '$line[12]')"; | |$results = mysql_query($IPFWsql) or die ("Could not execute query"); | |} |Again, any help with this issue is appreciated. |Thanks, | |Ron Clark | Could it be the fact that 1) date and time are reserved mysql keywords and should be enclosed in back ticks, and 2) you're listing 14 columns and adding 13 values? -- Registered Linux user #304026. "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import" Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855.

« previous php.general (#153413) next »