I try to execute the following code in my drupal blog page:
Adding products now...
$dbh = dba_open( "products", "c", "cdb" )
or die( "Couldn't open database" );
dba_insert( "Sonic Screwdriver", 23.20, $dbh);
dba_insert( "Tricorder", 55.50, $dbh);
dba_insert( "ORAC AI", 2200.50, $dbh);
dba_insert( "HAL 2000", 4500.00, $dbh);
dba_close( $dbh );
It should create or open a database called products and adds some data to it.
It gives the following error.
warning: dba_open(products,c): Driver initialization failed for handler: cdb: Update operations are not supported in C:\apache2triad\htdocs\nursen\includes\common.inc(1199) : eval()'d code on line 7.
I don't understand it. Because when I call dba_handlers, It gives the array for cdb, cdb_make, db3,inifile and flatfile. So what I am contemplating is I should be able to handle cdb type databases, however I can't. I am quite new to both php and databases. If someone help me to correct the code I will be glad.