Part of the EllisLab Network
   
 
DB_mssql.php - functions count_all AND _field_data
Posted: 23 October 2006 06:44 AM   [ Ignore ]  
Summer Student
Total Posts:  1
Joined  10-23-2006

in line 174:
$query = $this->query(“SELECT COUNT(*) AS numrows FROM `”.$this->dbprefix.$table.”`”);
This does not work in MS SQL Server 9.0.

It should be:
$query = $this->query(“SELECT COUNT(*) AS numrows FROM “.$this->dbprefix.$table);

OR

$query = $this->query(“SELECT COUNT(*) AS numrows FROM [”.$this->dbprefix.$table.”]”);

in case if there are problems with prefixes.

in line 246:
$sql = “SELECT TOP 1 FROM “.$this->escape_table($table);

It should be:
$sql = “SELECT TOP 1 * FROM “.$this->escape_table($table);

Profile
 
 
Posted: 23 October 2006 04:18 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRank
Total Posts:  2541
Joined  12-21-2001

Thank you.

 Signature 
Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 64453 Total Logged-in Users: 23
Total Topics: 80957 Total Anonymous Users: 0
Total Replies: 435678 Total Guests: 180
Total Posts: 516635    
Members ( View Memberlist )