Revision 2129
Added by darkviper over 10 years ago
| WbDatabaseHelper.php | ||
|---|---|---|
| 75 | 75 |
$keys = 0; |
| 76 | 76 |
$sql = 'SHOW INDEX FROM `'.$table_name.'`'; |
| 77 | 77 |
if (($res_keys = $this->doQuery($sql))) {
|
| 78 |
while (($rec_key = $res_keys->fetchRow(MYSQL_ASSOC))) {
|
|
| 78 |
while (($rec_key = $res_keys->fetchAssoc())) {
|
|
| 79 | 79 |
if ( $rec_key['Key_name'] == $index_name ) {
|
| 80 | 80 |
$keys++; |
| 81 | 81 |
} |
| ... | ... | |
| 114 | 114 |
return ( $this->isField($table_name, $field_name) ) ? true : false; |
| 115 | 115 |
} |
| 116 | 116 |
} else {
|
| 117 |
$this->set_error('field \''.$field_name.'\' already exists');
|
|
| 117 |
$this->setError('field \''.$field_name.'\' already exists');
|
|
| 118 | 118 |
} |
| 119 | 119 |
return false; |
| 120 | 120 |
} |
| ... | ... | |
| 257 | 257 |
$engineValue = (version_compare($mysqlVersion, '5.0') < 0) ? 'Type' : 'Engine'; |
| 258 | 258 |
$sql = 'SHOW TABLE STATUS FROM `' . $this->sDbName . '` LIKE \'' . $table . '\''; |
| 259 | 259 |
if (($result = $this->doQuery($sql))) {
|
| 260 |
if (($row = $result->fetchRow(MYSQL_ASSOC))) {
|
|
| 260 |
if (($row = $result->fetchAssoc())) {
|
|
| 261 | 261 |
$retVal = $row[$engineValue]; |
| 262 | 262 |
} |
| 263 | 263 |
} |
| ... | ... | |
| 290 | 290 |
$retval = true; |
| 291 | 291 |
$sNameValPairs = ''; |
| 292 | 292 |
foreach ($key as $index => $val) {
|
| 293 |
$sNameValPairs .= ', (\''.$index.'\', \''.$val.'\')';
|
|
| 293 |
$sNameValPairs .= ', (\''.$index.'\', \''.$oDb->escapeString($val).'\')';
|
|
| 294 | 294 |
} |
| 295 | 295 |
$sValues = ltrim($sNameValPairs, ', '); |
| 296 | 296 |
if ($sValues != '') {
|
Also available in: Unified diff
! framework/initialize.php added ErrorHandler and ERROR-LOG file