Git Product home page Git Product logo

mysql-export-explode's Introduction

mysql-export-explode

Clase php para exportar tablas mysql gigantes y dividir los resultados en varios archivos para hacer la tarea de exportacion e importacion mas fácil.

Use example:

db = 'dataBaseName'; # -- Set your database name $export->connect('host','user','password'); # -- Connecting to database $export->rows = array('Id','firstName','Telephone','Address'); # -- Set which fields you want to export $export->exportTable('myTableName',15); # -- Table name and in few fractions you want to split the table ?>
At the end of the SQL files are created in the directory where the script is executed in the following format
---------------------------------------
myTableName_0.sql
myTableName_1.sql
myTableName_2.sql
 ...

Multi table support

You can export multiple tables...

<?php
#Including the class
include 'mysql_export_explode.php';
$export = new mysql_export_explode;

$export->db = 'mysql_explode_test'; # -- Set your database name
$export->connect('localhost','root','your password'); # -- Connecting to database
$keys = array(
'table1'=>array('id','row1_table1','row1_table1'),
'table2'=>array('id','row1_table2','row1_table2')
);

foreach(array('table1','table2') as $t){
$export->rows = $keys[$t]; # -- Set dinamicaly which fields you want to export
$export->exportTable($t,2); # -- Table name and in few fractions you want to split the table
}
?>

Linea de prueba para git

mysql-export-explode's People

Contributors

barinascode avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.