Source for file DbStore.php

Documentation is available at DbStore.php

  1. <?php
  2.  
  3. // ----------------------------------------------------------------------------------
  4. // Class: DbStore
  5. // ----------------------------------------------------------------------------------
  6.  
  7.  
  8.  
  9. /**
  10. * DbStore is a persistent store of RDF data using relational database technology.
  11. * DbStore uses ADOdb Library for PHP V3.60 (http://php.weblogs.com/ADODB),
  12. * which allows to connect to multiple databases in a portable manner.
  13. * This class also provides methods for creating tables for MsAccess, MySQL, and MS SQL Server.
  14. * If you want to use other databases, you will have to create tables by yourself
  15. * according to the abstract database schema described in the API documentation.
  16. *
  17. * <BR><BR>History:<UL>
  18. * <LI>05-30-2005 : added dataset support
  19. * <LI>12-06-2004 : improved namespace handling added (tobias.gauss@web.de)</LI>
  20. * <LI>10-19-2004 : _isSetup_MSSQL() added. tobias.gauss@web.de</LI>
  21. * <LI>09-02-2004 : _isSetup_MySql() and _isSetupMsAccess() added. ggrimnes@csd.abdn.ac.uk/ tobias.gauss@web.de</LI>
  22. * <LI>06-17-2003 : First version of this class</LI>
  23. *
  24. *
  25. * @version V0.9.1
  26. * @author Radoslaw Oldakowski <radol@gmx.de>
  27. * @author Daniel Westphal (http://www.d-westphal.de)
  28. *
  29. * @package model
  30. * @access public
  31. */
  32.  
  33.  
  34. class DbStore extends Object{
  35.  
  36. /**
  37. * Database connection object
  38. *
  39. * @var object ADOConnection
  40. * @access private
  41. */
  42. var $dbConn;
  43.  
  44.  
  45. /**
  46. * Constructor:
  47. * Set the database connection with the given parameters.
  48. *
  49. * @param string $dbDriver
  50. * @param string $host
  51. * @param string $dbName
  52. * @param string $user
  53. * @param string $password
  54. * @access public
  55. */
  56. function DbStore ($dbDriver=ADODB_DB_DRIVER, $host=ADODB_DB_HOST, $dbName=ADODB_DB_NAME,
  57. $user=ADODB_DB_USER, $password=ADODB_DB_PASSWORD) {
  58. // include DBase Package
  59. require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE);
  60. // create a new connection object
  61. $this->dbConn =& ADONewConnection($dbDriver);
  62. // connect to database
  63. $this->dbConn->connect($host, $user, $password, $dbName);
  64. // optimized for speed
  65. $this->dbConn->setFetchMode(ADODB_FETCH_NUM);
  66. $ADODB_COUNTRECS = FALSE;
  67. //activate the ADOdb DEBUG mode
  68. if (ADODB_DEBUG_MODE =='1')
  69. $this->dbConn->debug = TRUE;
  70. }
  71.  
  72.  
  73. /**
  74. * Create tables and indexes for the given database type.
  75. * Currently supported: MsAccess and MySQL.
  76. * If you want to use other databases, you will have to create tables by yourself
  77. * according to the abstract <a href="database_schema.html">database schema</a>
  78. * described in the API documentation.
  79. *
  80. * @param string $databaseType
  81. * @throws PhpError
  82. * @access public
  83. */
  84. function createTables($databaseType) {
  85.  
  86. if (!strcasecmp($databaseType, 'MsAccess'))
  87. $this->_createTables_MsAccess();
  88. elseif (!strcasecmp($databaseType, 'MySQL'))
  89. $this->_createTables_MySql();
  90. elseif (!strcasecmp($databaseType, 'MSSQL'))
  91. $this->_createTables_mssql();
  92. else {
  93. $errmsg = RDFAPI_ERROR . "(class: DbStore; method: createTables('$databaseType')):
  94. Currently only MsAcces, MySQL and MSSQL supported.";
  95. trigger_error($errmsg, E_USER_ERROR);
  96. }
  97. }
  98.  
  99. /**
  100. * List all DbModels stored in the database.
  101. *
  102. * @return array
  103. * @throws SqlError
  104. * @access public
  105. */
  106. function listModels() {
  107.  
  108. $recordSet =& $this->dbConn->execute("SELECT modelURI, baseURI
  109. FROM models");
  110. if (!$recordSet)
  111. echo $this->dbConn->errorMsg();
  112. else {
  113. $models = array();
  114. $i=0;
  115. while (!$recordSet->EOF) {
  116.  
  117. $models[$i]['modelURI'] = $recordSet->fields[0];
  118. $models[$i]['baseURI'] = $recordSet->fields[1];
  119. ++$i;
  120. $recordSet->moveNext();
  121. }
  122. return $models;
  123. }
  124. }
  125. /**
  126. * Check if the DbModel with the given modelURI is already stored in the database
  127. *
  128. * @param string $modelURI
  129. * @return boolean
  130. * @throws SqlError
  131. * @access public
  132. */
  133. function modelExists($modelURI) {
  134.  
  135. $res =& $this->dbConn->execute("SELECT COUNT(*) FROM models
  136. WHERE modelURI = '" .$modelURI ."'");
  137. if (!$res)
  138. echo $this->dbConn->errorMsg();
  139. else {
  140. if (!$res->fields[0])
  141. return FALSE;
  142. return TRUE;
  143. }
  144. }
  145.  
  146.  
  147. /**
  148. * Create a new instance of DbModel with the given $modelURI and
  149. * load the corresponding values of modelID and baseURI from the database.
  150. * Return FALSE if the DbModel does not exist.
  151. *
  152. * @param string $modelURI
  153. * @return object DbModel
  154. * @access public
  155. */
  156. function getModel($modelURI) {
  157.  
  158. if (!$this->modelExists($modelURI))
  159. return FALSE;
  160. else {
  161. $modelVars =& $this->dbConn->execute("SELECT modelURI, modelID, baseURI
  162. FROM models
  163. WHERE modelURI='" .$modelURI ."'");
  164.  
  165. return new DbModel($this->dbConn, $modelVars->fields[0],
  166. $modelVars->fields[1], $modelVars->fields[2]);
  167. }
  168. }
  169.  
  170.  
  171. /**
  172. * Create a new instance of DbModel with the given $modelURI
  173. * and insert the DbModel variables into the database.
  174. * Return FALSE if there is already a model with the given URI.
  175. *
  176. * @param string $modelURI
  177. * @param string $baseURI
  178. * @return object DbModel
  179. * @throws SqlError
  180. * @access public
  181. */
  182. function getNewModel($modelURI, $baseURI=NULL) {
  183.  
  184. if ($this->modelExists($modelURI))
  185. return FALSE;
  186. else {
  187. $modelID = $this->_createUniqueModelID();
  188. $rs =& $this->dbConn->execute("INSERT INTO models
  189. VALUES ('" .$modelID ."',
  190. '" .$modelURI ."',
  191. '" .$baseURI ."')");
  192. if (!$rs)
  193. $this->dbConn->errorMsg();
  194. else
  195. return new DbModel($this->dbConn, $modelURI, $modelID, $baseURI);
  196. }
  197. }
  198.  
  199.  
  200. /**
  201. * Store a MemModel or another DbModel from a different DbStore in the database.
  202. * Return FALSE if there is already a model with modelURI matching the modelURI
  203. * of the given model.
  204. *
  205. * @param object Model &$model
  206. * @param string $modelURI
  207. * @return boolean
  208. * @access public
  209. */
  210. function putModel(&$model, $modelURI=NULL) {
  211.  
  212. if (!$modelURI) {
  213. if (is_a($model, 'MemModel'))
  214. $modelURI = 'DbModel-' .$this->_createUniqueModelID();
  215. else
  216. $modelURI = $model->modelURI;
  217. }else
  218. if ($this->modelExists($modelURI))
  219. return FALSE;
  220.  
  221. $newDbModel = $this->getNewModel($modelURI, $model->getBaseURI());
  222. $newDbModel->addModel($model);
  223. }
  224.  
  225.  
  226. /**
  227. * Close the DbStore.
  228. * !!! Warning: If you close the DbStore all active instances of DbModel from this
  229. * !!! DbStore will lose their database connection !!!
  230. *
  231. * @access public
  232. */
  233. function close() {
  234.  
  235. $this->dbConn->close();
  236. unset($this);
  237. }
  238.  
  239. // =============================================================================
  240. // **************************** private methods ********************************
  241. // =============================================================================
  242.  
  243.  
  244.  
  245.  
  246.  
  247. /**
  248. * Create a unique ID for the DbModel to be insert into the models table.
  249. * This method was implemented because some databases do not support auto-increment.
  250. *
  251. * @return integer
  252. * @access private
  253. */
  254. function _createUniqueModelID() {
  255. $maxModelID =& $this->dbConn->GetOne('SELECT MAX(modelID) FROM models');
  256. return ++$maxModelID;
  257. }
  258. /**
  259. * Create a unique ID for the dataset to be insert into the datasets table.
  260. * This method was implemented because some databases do not support auto-increment.
  261. *
  262. * @return integer
  263. * @access private
  264. */
  265. function _createUniqueDatasetID() {
  266. $maxDatasetID =& $this->dbConn->GetOne('SELECT MAX(datasetId) FROM datasets');
  267. return ++$maxDatasetID;
  268. }
  269.  
  270.  
  271. /**
  272. * Create tables and indexes for MsAccess database
  273. *
  274. * @throws SqlError
  275. * @access private
  276. */
  277. function _createTables_MsAccess() {
  278.  
  279. $this->dbConn->startTrans();
  280. $this->dbConn->execute('CREATE TABLE models
  281. (modelID long primary key,
  282. modelURI varchar not null,
  283. baseURI varchar)');
  284.  
  285. $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)');
  286.  
  287. $this->dbConn->execute('CREATE TABLE statements
  288. (modelID long,
  289. subject varchar,
  290. predicate varchar,
  291. object Memo,
  292. l_language varchar,
  293. l_datatype varchar,
  294. subject_is varchar(1),
  295. object_is varchar(1),
  296. primary key (modelID, subject, predicate, object,
  297. l_language, l_datatype))');
  298. $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)');
  299. $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject)');
  300. $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate)');
  301. $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object)');
  302.  
  303. $this->dbConn->execute('CREATE TABLE namespaces
  304. (modelID long,
  305. namespace varchar,
  306. prefix varchar,
  307. primary key (modelID, namespace, prefix))');
  308.  
  309. $this->dbConn->execute('CREATE INDEX n_name_idx ON namespaces (namespace)');
  310. $this->dbConn->execute('CREATE INDEX n_pref_idx ON namespaces (prefix)');
  311.  
  312. $this->dbConn->execute("CREATE TABLE datasets
  313. (datasetName varchar,
  314. defaultModelUri varchar,
  315. primary key (datasetName))");
  316. $this->dbConn->execute('CREATE INDEX nGS_idx1 ON datasets (datasetName)');
  317.  
  318. $this->dbConn->execute("CREATE TABLE `dataset_model` (
  319. datasetName varchar,
  320. modelId long,
  321. graphURI varchar,
  322. PRIMARY KEY (modelId,datasetName))");
  323. if (!$this->dbConn->completeTrans())
  324. echo $this->dbConn->errorMsg();
  325. }
  326.  
  327.  
  328. /**
  329. * Create tables and indexes for MySQL database
  330. *
  331. * @throws SqlError
  332. * @access private
  333. */
  334. function _createTables_MySql() {
  335.  
  336. $this->dbConn->startTrans();
  337.  
  338. $this->dbConn->execute("CREATE TABLE models
  339. (modelID bigint NOT NULL,
  340. modelURI varchar(255) NOT NULL,
  341. baseURI varchar(255) DEFAULT '',
  342. primary key (modelID))");
  343. $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)');
  344.  
  345. $this->dbConn->execute("CREATE TABLE statements
  346. (modelID bigint NOT NULL,
  347. subject varchar(255) NOT NULL,
  348. predicate varchar(255) NOT NULL,
  349. object text,
  350. l_language varchar(255) DEFAULT '',
  351. l_datatype varchar(255) DEFAULT '',
  352. subject_is varchar(1) NOT NULL,
  353. object_is varchar(1) NOT NULL)");
  354. $this->dbConn->execute("CREATE TABLE namespaces
  355. (modelID bigint NOT NULL,
  356. namespace varchar(255) NOT NULL,
  357. prefix varchar(255) NOT NULL,
  358. primary key (modelID,namespace))");
  359.  
  360. $this->dbConn->execute("CREATE TABLE `dataset_model` (
  361. `datasetName` varchar(255) NOT NULL default '0',
  362. `modelId` bigint(20) NOT NULL default '0',
  363. `graphURI` varchar(255) NOT NULL default '',
  364. PRIMARY KEY (`modelId`,`datasetName`))");
  365. $this->dbConn->execute("CREATE TABLE `datasets` (
  366. `datasetName` varchar(255) NOT NULL default '',
  367. `defaultModelUri` varchar(255) NOT NULL default '0',
  368. PRIMARY KEY (`datasetName`),
  369. KEY `datasetName` (`datasetName`))");
  370. $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)');
  371. $this->dbConn->execute('CREATE INDEX n_mod_idx ON namespaces (modelID)');
  372. $this->dbConn->execute('CREATE INDEX s_sub_pred_idx ON statements
  373. (subject(200),predicate(200))');
  374. $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object(250))');
  375.  
  376. if (!$this->dbConn->completeTrans())
  377. echo $this->dbConn->errorMsg();
  378. }
  379. /**
  380. * Create tables and indexes for MSSQL database
  381. *
  382. * @throws SqlError
  383. * @access private
  384. */
  385. function _createTables_mssql(){
  386. $this->dbConn->startTrans();
  387.  
  388. $this->dbConn->execute("CREATE TABLE [dbo].[models] (
  389. [modelID] [int] NOT NULL ,
  390. [modelURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  391. [baseURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  392. ) ON [PRIMARY]");
  393. $this->dbConn->execute("CREATE TABLE [dbo].[statements] (
  394. [modelID] [int] NOT NULL ,
  395. [subject] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  396. [predicate] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  397. [object] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  398. [l_language] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  399. [l_datatype] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  400. [subject_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  401. [object_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  402. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]");
  403. $this->dbConn->execute("CREATE TABLE [dbo].[namespaces] (
  404. [modelID] [int] NOT NULL ,
  405. [namespace] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
  406. [prefix] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  407. ) ON [PRIMARY]");
  408.  
  409. $this->dbConn->execute("ALTER TABLE [dbo].[models] WITH NOCHECK ADD
  410. CONSTRAINT [PK_models] PRIMARY KEY CLUSTERED
  411. (
  412. [modelID]
  413. ) ON [PRIMARY] ");
  414. $this->dbConn->execute("ALTER TABLE [dbo].[namespaces] WITH NOCHECK ADD
  415. CONSTRAINT [PK_namespaces] PRIMARY KEY CLUSTERED
  416. (
  417. [modelID],[namespace]
  418. ) ON [PRIMARY] ");
  419. $this->dbConn->execute("CREATE INDEX [joint index on subject and predicate] ON [dbo].[statements]([subject], [predicate]) ON [PRIMARY]");
  420.  
  421. if (!$this->dbConn->completeTrans())
  422. echo $this->dbConn->errorMsg();
  423. }
  424. /**
  425. * Checks if tables are setup for RAP
  426. *
  427. * @param string $databaseType
  428. * @throws SqlError
  429. * @access public
  430. ***/
  431. function isSetup($databaseType="MySQL") {
  432. if ($databaseType=="MySQL")
  433. return $this->_isSetup_MySql();
  434. if ($databaseType=="MSSQL")
  435. return $this->_isSetup_MSSQL();
  436. else {
  437. if ($databaseType=='MsAccess'){
  438. return $this->_isSetup_MsAccess();
  439. }else{
  440. $errmsg=RDFAPI_ERROR."(class: DbStore; method isSetup('$databaseType')):\nCurrently only MySQL, MsAccess and MSSQL are supported!";
  441. trigger_error($errmsg, E_USER_ERROR);}
  442. }
  443. }
  444.  
  445. /**
  446. * Checks if tables are setup for RAP (MySql)
  447. *
  448. * @throws SqlError
  449. * @access private
  450. ***/
  451. function _isSetup_MySql() {
  452. $recordSet =& $this->dbConn->execute("SHOW TABLES");
  453. if (!$recordSet)
  454. echo $this->dbConn->errorMsg();
  455. else {
  456. $tables = array();
  457. while (!$recordSet->EOF) {
  458.  
  459. $tables[]= $recordSet->fields[0];
  460. if(isset($i)){++$i;}
  461. $recordSet->moveNext();
  462. }
  463. if (in_array("models",$tables) && in_array("statements",$tables)&& in_array("namespaces",$tables)) return true;
  464. }
  465. return false;
  466. }
  467. /**
  468. * Checks if tables are setup for RAP (MsAccess)
  469. *
  470. * @throws SqlError
  471. * @access private
  472. ***/
  473. function _isSetup_MsAccess() {
  474. $tables =& $this->dbConn->MetaTables();
  475. if (!$tables)
  476. echo $this->dbConn->errorMsg();
  477. if (count($tables)==0){
  478. return false;}
  479. else {
  480. if (in_array("models",$tables) && in_array("statements",$tables) && in_array("namespaces",$tables)){ return true;
  481. }else{return false;}
  482. }
  483. }
  484. /**
  485. * Checks if tables are setup for RAP (MSSQL)
  486. *
  487. * @throws SqlError
  488. * @access private
  489. ***/
  490. function _isSetup_MSSQL() {
  491. $tables =& $this->dbConn->MetaTables();
  492. if (!$tables)
  493. echo $this->dbConn->errorMsg();
  494. if (count($tables)==0){
  495. return false;}
  496. else {
  497. if (in_array("models",$tables) && in_array("statements",$tables) && in_array("namespaces",$tables)){ return true;
  498. }else{return false;}
  499. }
  500. }
  501. /**
  502. * Create a new instance of DatasetDb with the given $datasetName
  503. * and insert the DatasetDb variables into the database.
  504. * Return FALSE if there is already a model with the given URI.
  505. *
  506. * @param $datasetName string
  507. * @return object DatasetDB
  508. * @throws SqlError
  509. * @access public
  510. */
  511. function & getNewDatasetDb($datasetName)
  512. {
  513.  
  514. require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET);
  515. if ($this->datasetExists($datasetName))
  516. return FALSE;
  517. else
  518. {
  519. $defaultModelUri=uniqid('http://rdfapi-php/dataset_defaultmodel_');
  520. $defaultModel=$this->getNewModel($defaultModelUri);
  521. $rs =& $this->dbConn->execute("INSERT INTO datasets
  522. VALUES ('" .$datasetName ."',
  523. '" .$defaultModelUri."')");
  524. if (!$rs)
  525. $this->dbConn->errorMsg();
  526. else
  527. $return=new DatasetDb(&$this->dbConn,&$this,$datasetName);
  528. return ($return);
  529. }
  530. }
  531.  
  532. /**
  533. * Check if the Dataset with the given $datasetName is already stored in the database
  534. *
  535. * @param $datasetName string
  536. * @return boolean
  537. * @throws SqlError
  538. * @access public
  539. */
  540. function datasetExists($datasetName) {
  541.  
  542. $res =& $this->dbConn->execute("SELECT COUNT(*) FROM datasets
  543. WHERE datasetName = '" .$datasetName ."'");
  544. if (!$res)
  545. echo $this->dbConn->errorMsg();
  546. else {
  547. if (!$res->fields[0])
  548. return FALSE;
  549. return TRUE;
  550. }
  551. }
  552. /**
  553. * Create a new instance of DatasetDb with the given $datasetName and
  554. * load the corresponding values from the database.
  555. * Return FALSE if the DbModel does not exist.
  556. *
  557. * @param $datasetId string
  558. * @return object DatasetDb
  559. * @access public
  560. */
  561. function getDatasetDb($datasetName) {
  562. require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET);
  563.  
  564. if (!$this->datasetExists($datasetName))
  565. return FALSE;
  566. else
  567. {
  568. $return=new DatasetDb(&$this->dbConn,&$this,$datasetName);
  569. return ($return);
  570. }
  571. }
  572. /**
  573. * Create a new instance of namedGraphDb with the given $modelURI and graphName and
  574. * load the corresponding values of modelID and baseURI from the database.
  575. * Return FALSE if the DbModel does not exist.
  576. *
  577. * @param $modelURI string
  578. * @param $graphName string
  579. * @return object NamedGraphMem
  580. * @access public
  581. */
  582. function getNamedGraphDb($modelURI, $graphName)
  583. {
  584. require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET);
  585. if (!$this->modelExists($modelURI))
  586. return FALSE;
  587. else {
  588. $modelVars =& $this->dbConn->execute("SELECT modelURI, modelID, baseURI
  589. FROM models
  590. WHERE modelURI='" .$modelURI ."'");
  591.  
  592. return new NamedGraphDb($this->dbConn, $modelVars->fields[0],
  593. $modelVars->fields[1], $graphName ,$modelVars->fields[2]);
  594. }
  595. }
  596. /**
  597. * Create a new instance of namedGraphDb with the given $modelURI and graphName
  598. * and insert the DbModel variables into the database (not the graphName. This
  599. * is only stored persistently, when added to dataset).
  600. * Return FALSE if there is already a model with the given URI.
  601. *
  602. * @param $modelURI string
  603. * @param $graphName string
  604. * @param $baseURI string
  605. * @return object namedGraphDb
  606. * @throws SqlError
  607. * @access public
  608. */
  609. function getNewNamedGraphDb($modelURI, $graphName, $baseURI=NULL) {
  610.  
  611. if ($this->modelExists($modelURI))
  612. return FALSE;
  613. else {
  614. $modelID = $this->_createUniqueModelID();
  615. $rs =& $this->dbConn->execute("INSERT INTO models
  616. VALUES ('" .$modelID ."',
  617. '" .$modelURI ."',
  618. '" .$baseURI ."')");
  619. if (!$rs)
  620. $this->dbConn->errorMsg();
  621. else
  622. return new NamedGraphDb($this->dbConn, $modelURI, $modelID, $graphName, $baseURI);
  623. }
  624. }
  625. /**
  626. * Removes the graph with all statements from the database.
  627. * Warning: A single namedGraph can be added to several datasets. So it'll be
  628. * removed from all datasets.
  629. *
  630. * @param $modelURI string
  631. * @return boolean
  632. * @throws SqlError
  633. * @access public
  634. */
  635. function removeNamedGraphDb($modelURI)
  636. {
  637. if (!$this->modelExists($modelURI))
  638. return FALSE;
  639. $modelID = $this->dbConn->GetOne("SELECT modelID FROM models WHERE modelURI='".$modelURI."'");
  640. $this->dbConn->execute("DELETE FROM models WHERE modelID=".$modelID);
  641. $this->dbConn->execute("DELETE FROM dataset_model WHERE modelId=".$modelID);
  642. $this->dbConn->execute("DELETE FROM statements WHERE modelID=".$modelID);
  643. return true;
  644. }
  645. } // end: Class DbStore
  646. ?>

Documentation generated on Thu, 7 Jul 2005 13:41:25 +0200 by phpDocumentor 1.3.0RC3