Revision 1535
Added by Dietmar almost 13 years ago
class.database.php | ||
---|---|---|
283 | 283 |
return $retval; |
284 | 284 |
} |
285 | 285 |
|
286 |
/** |
|
287 |
* retuns the type of the engine used for requested table |
|
288 |
* @param string $table name of the table, including prefix |
|
289 |
* @return boolean/string false on error, or name of the engine (myIsam/InnoDb) |
|
290 |
*/ |
|
291 |
public function getTableEngine($table) |
|
292 |
{ |
|
293 |
$retVal = false; |
|
294 |
$mysqlVersion = mysql_get_server_info($this->db_handle); |
|
295 |
$engineValue = (version_compare($mysqlVersion, '5.0') < 0) ? 'Type' : 'Engine'; |
|
296 |
$sql = "SHOW TABLE STATUS FROM " . DB_NAME . " LIKE '" . $table . "'"; |
|
297 |
if(($result = $this->query($sql))) { |
|
298 |
if(($row = $result->fetchRow(MYSQL_ASSOC))) { |
|
299 |
$retVal = $row[$engineValue]; |
|
300 |
} |
|
301 |
} |
|
302 |
return $retVal; |
|
303 |
} |
|
304 |
|
|
305 |
|
|
286 | 306 |
} /// end of class database |
287 | 307 |
|
288 | 308 |
class mysql { |
... | ... | |
358 | 378 |
} |
359 | 379 |
return $retval; |
360 | 380 |
} |
361 |
?> |
Also available in: Unified diff
! changes in code modul
+ add function getTableEngine to class.database
+ add Quickskin to include folder
+ add reworkes Droplet SectionPicker to load modules frontend.css