diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-03-20 15:19:20 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-03-20 15:19:20 +0000 |
| commit | 1fbbc382ccb6f0ffc081c7c1c8704bda6d643fb9 (patch) | |
| tree | 55f56783ce5e1ad88d831091a67b2dadac52a17f /phpBB/db/mssql.php | |
| parent | bcf7d2b674297f96917095bc2b2b80b0a0571eac (diff) | |
| download | forums-1fbbc382ccb6f0ffc081c7c1c8704bda6d643fb9.tar forums-1fbbc382ccb6f0ffc081c7c1c8704bda6d643fb9.tar.gz forums-1fbbc382ccb6f0ffc081c7c1c8704bda6d643fb9.tar.bz2 forums-1fbbc382ccb6f0ffc081c7c1c8704bda6d643fb9.tar.xz forums-1fbbc382ccb6f0ffc081c7c1c8704bda6d643fb9.zip | |
Removed set_db and added affectedrows
git-svn-id: file:///svn/phpbb/trunk@109 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/db/mssql.php')
| -rw-r--r-- | phpBB/db/mssql.php | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/phpBB/db/mssql.php b/phpBB/db/mssql.php index 96a0f925c0..96bb0a3aff 100644 --- a/phpBB/db/mssql.php +++ b/phpBB/db/mssql.php @@ -70,20 +70,10 @@ class sql_db } return $this->db_connect_id; } + // // Other base methods // - function sql_setdb($database) - { - $this->dbname = $database; - $dbselect = @mssql_select_db($this->dbname); - if(!$dbselect) - { - sql_close(); - $this->db_connect_id = $dbselect; - } - return $this->db_connect_id; - } function sql_close() { if($this->db_connect_id) @@ -170,6 +160,9 @@ class sql_db { $this->query_result = @mssql_query($query, $this->db_connect_id); + $next_id_query = @mssql_query("SELECT @@ROWCOUNT AS this_count"); + $this->affected_rows[$this->query_result] = $this->sql_fetchfield("this_count", -1, $next_id_query); + $this->query_limit_offset[$this->query_result] = -1; $this->query_limit_numrows[$this->query_result] = -1; } @@ -208,6 +201,21 @@ class sql_db return false; } } + function sql_affectedrows($query_id = 0) + { + if(!$query_id) + { + $query_id = $this->query_result; + } + if($query_id) + { + return $affected_rows[$query_id]; + } + else + { + return false; + } + } function sql_numfields($query_id = 0) { if(!$query_id) |
