Skip to content

transparency-everywhere/dbClass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP dbClass

The dbClass for PHP isn't an eyecatcher, but it´s working solid and save. It can be used for simple mysql queries and manipulation.


Getting Started

To get started you only need to change the database settings inside config.php

Initialize the class

$db = new db(); //create instance

$addValues['title'] = 'someTitle';
$addValues['someNumber'] = 42;

$insert_id = $db->insert('tablename', $addValues);

UPDATE ROW IN TABLE

$updateValues['title'] = 'newTitle';
$db->update('tableName', $updateValues, array('id', $insert_id));

SELECT FROM TABLE

$allRows = $db->select('tableName');

SELECT FROM TABLE WHERE ...

$specificRow = $db->select('tableName', array('id', $insert_id));

DELETE FROM TABLE

$db->delete('tableName', array('id', $insert_id));

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages