Changeset 1288 in ExiteCMS
- Timestamp:
- 02/17/08 13:43:04 (4 years ago)
- File:
-
- 1 edited
-
trunk/includes/db_functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/db_functions.php
r1195 r1288 110 110 111 111 $cond = ($conditions ? " WHERE ".$conditions : ""); 112 $sql = "SELECT Count".$field." FROM ". $db_prefix.$table.$cond;113 112 $sql = "SELECT Count".$field." FROM ".(strpos($table, ".") ? $table : $db_prefix.$table).$cond; 113 114 114 $result = dbquery($sql, false); 115 115 if (!$result) { … … 183 183 $_loadstats['querytime'] -= $_s_loadtime; 184 184 185 $db_select = @mysql_select_db( ($db != "" && $db != $db_name) ? $db :$db_name ); 185 if (!empty($db) && $db != $db_name) { 186 $db_select = @mysql_select_db($db); 187 if (!$db_select) return false; 188 } 186 189 $result = @mysql_query("SHOW TABLES"); 187 190 while ($data = @mysql_fetch_array($result)) { … … 189 192 } 190 193 @mysql_free_result($result); 194 $db_select = @mysql_select_db($db_name ); 191 195 192 196 $_loadstats['queries']++;
Note: See TracChangeset
for help on using the changeset viewer.
