|
Posted by ImOk on 06/20/06 13:28
Anyone know of an extension that is an in memory database?
I dont want to create any files on disk (nor install a database engine)
but have an object/variable that points to a database and tables all in
memory. Then to be able to do simple select, insert, deletes and
updates.
This could be easier than using arrays for certain tasks.
Something like this would be nice. E.g.
$db->new memDB('myDB');
$tbl=new memTBL('names')
$tbl->addCol('fname','CHAR',20);
$tbl->addCol('lname','CHAR',20);
$tbl->addCol('dob','DATE');
$tbl->addKey('fname');
$tbl->addKey('lname','fname');
$db->addTable($tbl);
$db->exec("insert into names ('fname',lname','dob') values
('John','Doe','1/1/1900')");
$db->exec("select * from names where fname='John' order by lname");
Thanks
Navigation:
[Reply to this message]
|