2016-07-31 12:28:41 +00:00
|
|
|
<?php
|
|
|
|
require_once 'db-mysql.php';
|
|
|
|
|
2016-07-31 17:39:53 +00:00
|
|
|
$db = new db('localhost', 'testdb', 'root', 'jup2000');
|
2016-07-31 12:28:41 +00:00
|
|
|
$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';
|
|
|
|
|
2016-07-31 17:39:53 +00:00
|
|
|
var_dump($db->createCol('test', ['id' => 'int', 'title' => 'string', 'content' => 'longstring', 'boolean' => 'boolean']));
|
2016-07-31 12:28:41 +00:00
|
|
|
$db->clear();
|