Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Alexandru Trandafir Catalin  >  Auto DB Up  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: This code must be included into all the pages of your application.
Class: Auto DB Up
Update a MySQL database from SQL files
Author: By
Last change:
Date: 2010-06-01 12:44
Size: 508 bytes
 

Contents

Class file image Download
<?php

# Include the script.
include_once('AutoDbUp.php');

# Load the script and specify the path where all sql files are saved,
# the files inside that directory must contain numeric names and increasing
# that will be the revision number of your database, example:
# 1.sql, 2.sql, 3.sql, 4.sql, 5.sql and so on, for each update you make.
$autoDbUp = new AutoDbUp('path/to/sql/files');

# Run the script's upgrade method to search all the new sql files and run them.
$autoDbUp->upgrade();

?>