Skip to content

Commit

Permalink
Using static database accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdunn committed Mar 21, 2011
1 parent 31142f7 commit 4b6a9ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions extension.driver.php
Expand Up @@ -13,13 +13,13 @@ public function about(){
}

public function uninstall(){
$this->_Parent->Database->query("DROP TABLE `tbl_fields_hash`");
Symphony::Database()->query("DROP TABLE `tbl_fields_hash`");
}


public function install(){

return $this->_Parent->Database->query("CREATE TABLE `tbl_fields_hash` (
return Symphony::Database()->query("CREATE TABLE `tbl_fields_hash` (
`id` int(11) unsigned NOT NULL auto_increment,
`field_id` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`),
Expand Down
6 changes: 3 additions & 3 deletions fields/field.hash.php
Expand Up @@ -41,8 +41,8 @@ function commit(){

$fields['field_id'] = $id;

$this->_engine->Database->query("DELETE FROM `tbl_fields_".$this->handle()."` WHERE `field_id` = '$id' LIMIT 1");
return $this->_engine->Database->insert($fields, 'tbl_fields_' . $this->handle());
Symphony::Database()->query("DELETE FROM `tbl_fields_".$this->handle()."` WHERE `field_id` = '$id' LIMIT 1");
return Symphony::Database()->insert($fields, 'tbl_fields_' . $this->handle());

}

Expand Down Expand Up @@ -126,7 +126,7 @@ public function processRawFieldData($data, &$status, $simulate=false, $entry_id=

public function createTable(){

return $this->Database->query(
return Symphony::Database()->query(

"CREATE TABLE IF NOT EXISTS `tbl_entries_data_" . $this->get('id') . "` (
`id` int(11) unsigned NOT NULL auto_increment,
Expand Down

0 comments on commit 4b6a9ff

Please sign in to comment.