Skip to content

zualex/SqlCvs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SqlCvs

PHP class for working SQL and CVS.

Exmaple

require_once __DIR__ . '/vendor/autoload.php';

use \SqlCvs\SqlCvs;

$sqlCvs = new SqlCvs('mysql:dbname=test_db;host=127.0.0.1', 'root', '');
$table = 'my_table2';

if (!$sqlCvs->isExistTable($table)) {
    $sqlCvs->import($table, 'tests/example.cvs');
}

$sqlCvs->setTable($table);
$row = $sqlCvs->getRandomRow();
if (count($row)) {
    $sqlCvs->update($row['id'], ['status' => 1]);
    echo $row['value'];
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages