note 57332 rejected from function.mysql-query by jome

From: Date: Fri, 30 Sep 2005 17:51:31 +0000
Subject: note 57332 rejected from function.mysql-query by jome
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96063@lists.php.net to get a copy of this message
Note Submitter: penguinkiller at singapore dot net ---- how can i get $url <?php function parse_mysql_dump($url, $ignoreerrors = false) { $file_content = file($url); $query = ""; foreach($file_content as $sql_line) { $tsl = trim($sql_line); if (($sql != "") && (substr($tsl, 0, 2) != "--") && (substr($tsl, 0, 1) != "#")) { $query .= $sql_line; if(preg_match("/;\s*$/", $sql_line)) { $result = mysql_query($query); if (!$result && !$ignoreerrors) die(mysql_error()); $query = ""; } } } } ?>

« previous php.notes (#96063) next »