outdb Small PHP mysql framework

Only functions to make backend developers feel better

Source Code git

SELECT many rows

$data = db("SELECT * FROM `somedata` ");
result : $data[$i]['id'] or $data[$i]['text']


$data = db("SELECT `id` FROM `somedata`");
result : $data[$i]['id']

SELECT one row (LIMIT 1;)


$data = db("SELECT * FROM `somedata` WHERE `id`=114 LIMIT 1;");
result : $data['id']


$data = db("SELECT `title` FROM `somedata` WHERE `id`=114 LIMIT 1;");
result : $data

INSERT


$table = 'somedata'; $input['id'] = 3; $input['article'] = 'some blah blah';
insert($table,$input);

UPDATE

$table = 'somedata'; $input['id'] = 4; $input['article'] = 'some blah blah AFTO'; $where = "WHERE `week` = 'Monday'";
update($table,$input,$where);

DELETE

db("DELETE FROM `somedata` WHERE `id` LIKE 1;");

Creator : George Katsoupakis

Quality Intrnet Productions