Recommend this page to a friend! |
Download .zip |
Info | Example | View files (6) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-01-10 (3 days ago) | Not enough user ratings | Total: 399 This week: 6 | All time: 6,563 This week: 50 |
Version | License | PHP version | Categories | |||
database-fill 0.67 | GNU General Publi... | 5.3 | PHP 5, Databases, Testing |
Description | Author | |
This class can fill records of MySQL tables with test data. |
<?php |
<br>
<hr>
<br>
<br>
[1]: https://tinram.github.io/images/databasefiller-data.png ![Database-Filler database][1]
<br>
Originally, I needed to populate a database containing 14 complex tables. Tools such as Spawner are ideal for populating small tables, but in this case, specifying the datatypes for 300+ fields to initiate Spawner would have been insanity.
Instead, why not parse the SQL schema?
[2]: https://tinram.github.io/images/databasefiller-execute.png ![Database-Filler execute][2]
Configuration boolean toggles (false
by default):
Ensure the database already exists in MySQL e.g. for the test schema:
mysql -u root -p < test.sql
Adjust the array connection details and parameters in the file databasefiller_example.php
Then execute this file with PHP on the command-line:
php databasefiller_example.php
or run the file through a web server e.g.
http://localhost/Database-Filler/databasefiller_example.php
SQLParser would have been used in this project had it been available in 2014.
Database Filler is released under the GPL v.3.
Files |
File | Role | Description | ||
---|---|---|---|---|
classes (1 file) | ||||
basketball.sql | Data | Auxiliary data | ||
databasefiller_example.php | Example | Example script | ||
LICENSE | Lic. | Auxiliary data | ||
README.md | Doc. | Auxiliary data | ||
test.sql | Data | Auxiliary data |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Comments (1) | |||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.