PHP code example of jinraynor1 / table_cleaner
1. Go to this page and download the library: Download jinraynor1/table_cleaner library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jinraynor1 / table_cleaner example snippets
$date = new DateTime("2019-02-01");
$regex = new \Jinraynor1\TableCleaner\TableRegex("/^dropme([0-9]{8})$/", $date, "Ymd");
$driver = new \Jinraynor1\TableCleaner\Drivers\Sqlite(new PDO('mysql:host=localhost;dbname=testdb','root',''));
$table_cleaner = new \Jinraynor1\TableCleaner\TableCleaner($driver, $regex);
$table_cleaner->drop();