Changeset 6216 for extensions/autoupdate/branches/1.7/include
- Timestamp:
- May 17, 2010, 10:58:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/autoupdate/branches/1.7/include/mysqldump.php
r6205 r6216 145 145 while ( $record = mysql_fetch_assoc($records) ) { 146 146 $structure .= '`'.$record['Field'].'` '.$record['Type']; 147 if ( !empty($record['Default']) )147 if ( isset($record['Default']) ) 148 148 $structure .= ' DEFAULT \''.$record['Default'].'\''; 149 149 if ( @strcmp($record['Null'],'YES') != 0 ) 150 150 $structure .= ' NOT NULL'; 151 elseif ( is_null($record['Default']) ) 152 $structure .= ' DEFAULT NULL'; 151 153 if ( !empty($record['Extra']) ) 152 154 $structure .= ' '.$record['Extra']; … … 206 208 $selectStatement .= ", "; 207 209 } 208 $insertStatement = @substr($insertStatement,0,-2).') VALUES' ;210 $insertStatement = @substr($insertStatement,0,-2).') VALUES'."\n"; 209 211 $selectStatement = @substr($selectStatement,0,-2).' FROM `'.$table.'`'; 210 212 … … 222 224 if ( @$hexField[$j] && (@strlen($record[$field_name]) > 0) ) 223 225 $data .= "0x".$record[$field_name]; 226 elseif (is_null($record[$field_name])) 227 $data .= "NULL"; 224 228 else 225 229 $data .= "'".@str_replace('\"','"',@mysql_escape_string($record[$field_name]))."'";
Note: See TracChangeset
for help on using the changeset viewer.