Lines Matching refs:db

63 	protected $db;  variable in Database2
165 $this->db = null;
194 return $this->db;
463 $this->db = new PDO( $dsn, $username, $password );
466 $this->db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
469 $this->driver = strtolower( trim( $this->db->getAttribute(
478 $this->db->query( 'SET NAMES UTF8' );
494 $this->db = $this->driver = null;
874 $st = $this->db->prepare( $sql );
930 if ( $this->db->query( $sql ) === false )
1074 if ( !$this->db->beginTransaction() )
1128 $st = $this->db->prepare( $sql );
1139 if ( !$this->db->commit() )
1163 if ( !$this->db->rollBack() )
1210 $st = $this->db->prepare( $sql );
1380 if ( !$this->db->beginTransaction() )
1389 $this->db->rollback();
1396 $st = $this->db->prepare( 'DELETE FROM ' . $this->table . ' WHERE '.
1407 if ( !$this->db->commit() )
1414 $this->db->rollback();
1430 if ( !$this->db->beginTransaction() )
1439 $this->db->rollback();
1444 if ( $this->db->query( 'DROP TABLE ' . $this->table ) === false )
1450 if ( !$this->db->commit() )
1457 $this->db->rollback();
1550 $st = $this->db->prepare( $query . $filter );
1664 $st = $this->db->prepare( $query . $filter . $order . $limit );
2679 $st = $this->db->prepare( 'SELECT ' . implode( ',', $cols ) .
2719 $st = $this->db->prepare( 'SELECT ' . implode( ',', $cols ) .
3809 $resultset = $this->db->query( $readerSQL );
4111 $s = $this->db->query( $sql );
4156 if ( $this->db->query( <<<EOT
4167 if ( !$nestedTransaction && !$this->db->beginTransaction() )
4174 $st = $this->db->prepare('SELECT recent FROM __keys WHERE tablename=?');
4200 $st = $this->db->prepare( $sql );
4209 if ( !$nestedTransaction && !$this->db->commit() )
4219 if ( !$nestedTransaction && !$this->db->rollBack() )
4274 if ( $this->db->query( <<<EOT
4289 $st = $this->db->prepare( 'INSERT INTO __log (tablename,rowid,action,' .
4301 $this->db->query( 'DELETE FROM __log WHERE ctime<'.(time()-30*86400));
4330 if ( $this->db->query( <<<EOT
4351 if ( !$inTransaction && !$this->db->beginTransaction() )
4373 $st = $this->db->prepare( 'SELECT COUNT(*) FROM __locks ' .
4395 $st = $this->db->prepare( 'SELECT username,obtained FROM __locks ' .
4435 $st = $this->db->prepare( $sql );
4445 if ( !$inTransaction && !$this->db->commit() )
4454 if ( !$inTransaction && !$this->db->rollBack() )
4494 if ( !$inTransaction && !$this->db->beginTransaction() )
4506 $st = $this->db->prepare( 'DELETE FROM __locks WHERE tablename=? AND ' .
4515 if ( !$inTransaction && !$this->db->commit() )
4525 if ( !$inTransaction && !$this->db->rollBack() )
6186 return $this->db;