PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Rupom Razzaque   SQL Parsing   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Example Usage of the Class
Class: SQL Parsing
Parse and execute MySQL statements from a file
Author: By
Last change:
Date: 18 years ago
Size: 519 bytes
 

Contents

Class file image Download
<?php
/**
* Author : MA Razzaque Rupom (rupom_315@yahoo.com)
* Version : 1.0
* Date : 12 Feb, 2006
* Purpose : Importing valid SQL dump to DB
* Release : Released under GNU Public License
*/

require_once "parse.class.php";

mysql_connect("hostname","username","password") or die('Cant Connect...');
mysql_select_db("razz_test") or die('DB Connection Problem...');;


$parseObj = new parse('your_sql_file.sql');
$res = $parseObj->startParsing();

if(
$res)
{
   echo
"<b>Query Executed Successfully.</b>";
}

?>