dev-master
9999999-dev https://github.com/tawazz/Tazzy-HelpersCommon helpers
MIT
The Requires
- php >=7.0
helpers utils
Common helpers
php helper functions for common tasks ranging from database , file handling, validation,emails,hashing, tokens and sessions, (*1)
To use Tazzy-Helpers in your project:, (*2)
Database accesss:, (*3)
$GLOBALS['config'] = [ 'db' => [ 'driver' => 'mysql', 'host' => 'localhost', 'username' => 'root', 'password' => 'secret', 'db' => 'database', 'prefix' => '' ] ];
* edit the config file to set your database config settings. Note Database uses PDO
$users = DB::getInstance()->query('Select * from users'); if(!$users->count()){ echo 'no such user found'; }else{ foreach($users->result() as $user){ echo $user->username; } }
$insert = DB::getInstance()-> insert('users',array( 'firstname'=> 'john', 'lastname'=> 'doe', ));
$update = DB::getInstance()->update('users',array('id','=', '1'),array( 'firstname'=> 'alex' ));
Common helpers
MIT
helpers utils