note 57332 added to function.mysql-query

From: Date: Fri, 30 Sep 2005 17:33:04 +0000
Subject: note 57332 added to function.mysql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-96061@lists.php.net to get a copy of this message
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 = ""; } } } } ?> ---- Manual Page -- http://www.php.net/manual/en/function.mysql-query.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57332 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57332&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57332&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57332&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57332&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57332&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57332&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57332&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57332&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#96061) next »