mirror of
https://github.com/Mowie/Database-Class.git
synced 2024-10-05 03:08:25 +00:00
27 lines
830 B
PHP
Executable File
27 lines
830 B
PHP
Executable File
<?php
|
|
require_once 'db-mysql.php';
|
|
|
|
$db = new db('localhost', 'testdb', 'root', 'jup2000');
|
|
$db->setCol('blog');
|
|
//$db->data['id'] = 13;
|
|
//$db->get();
|
|
//print_r($db->get());
|
|
//print_r($db->data);
|
|
|
|
|
|
/*$db->data['titel'] = 'testdbclas';
|
|
$db->data['alias'] = '---d-d-d-d-';
|
|
$db->insert();*/
|
|
//if($db->insert(['titel' => 'testclass', 'inhalt' => 'baum', 'alias' => '0000003030498-g-dfghd-f'])) echo 'yay';
|
|
|
|
/*$db->data['titel'] = 'GAadsfhganz Neu';
|
|
$db->data['inhalt'] = 'gabs noch net';*/
|
|
//$db->update(['id' => 12]);
|
|
//if($db->update(['titel' => 'wat anderes', 'inhalt' => 'meh'], ['id' => 7])) echo 'update!';
|
|
|
|
//$db->data['id'] = 9;
|
|
//$db->delete();
|
|
//if($db->delete(['id' => 6])) echo 'del';
|
|
|
|
var_dump($db->createCol('test', ['id' => 'int', 'title' => 'string', 'content' => 'longstring', 'boolean' => 'boolean']));
|
|
$db->clear(); |