The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
SQL PHP Help needed "urgent"
i have this statement in a php file but keeps throwing up some error can someon eplease look over this code and get back to me with any morrections needed
Code:
$sql = "INSERT INTO `list` SET "; $sql .= "`stamp`='" . sql_escape_string($stamp) . "', "; $sql .= "`ip`='" . sql_escape_string($ip) . "', "; $sql .= "`type`='" . sql_escape_string($type) . "', "; $sql .= "`threat`='" . sql_escape_string($threat) . "', "; $sql .= "`datetime`=now() "; $r = sql_command($sql); if ($r == 1) { ######################################## # good insertion, get record id number # ######################################## $id = sql_insert_id("list", "id"); return $id; } function sql_command ($sql) { if (mysql_query($sql)) return mysql_affected_rows(); return -1; } function sql_insert_id($table, $field) { return mysql_insert_id(); } function sql_escape_string ($string) { if (get_magic_quotes_gpc()) { $string = stripslashes($string); } $string = mysql_real_escape_string($string); return $string; } thank you |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|