Changeset 142 for devel/web/USqlDatabase.pas
- Timestamp:
- Jan 22, 2009, 9:20:15 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/web/USqlDatabase.pas
r134 r142 153 153 I: Integer; 154 154 Value: string; 155 DbRows: TDbRows; 155 156 begin 156 157 Table := ATable; … … 166 167 System.Delete(DbNames, 1, 1); 167 168 System.Delete(DbValues, 1, 1); 168 Query('INSERT INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 169 DbRows := Query('INSERT INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 170 DbRows.Free; 169 171 end; 170 172 … … 219 221 Value: string; 220 222 I: Integer; 223 DbRows: TDbRows; 221 224 begin 222 225 Table := ATable; … … 232 235 System.Delete(DbNames, 1, 1); 233 236 System.Delete(DbValues, 1, 1); 234 Query('REPLACE INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 237 DbRows := Query('REPLACE INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 238 DbRows.Free; 235 239 end; 236 240 … … 246 250 Value: string; 247 251 I: Integer; 252 DbRows: TDbRows; 248 253 begin 249 254 Table := ATable; … … 256 261 end; 257 262 System.Delete(DbValues, 1, 1); 258 Query('UPDATE `' + Table + '` SET (' + DbValues + ') WHERE ' + Condition); 263 DbRows := Query('UPDATE `' + Table + '` SET (' + DbValues + ') WHERE ' + Condition); 264 DBRows.Free; 259 265 end; 260 266 … … 302 308 303 309 procedure TSqlDatabase.Delete(ATable: string; Condition: string = '1'); 310 var 311 DbRows: TDbRows; 304 312 begin 305 313 Table := ATable; 306 Query('DELETE FROM `' + Table + '` WHERE ' + Condition); 314 DbRows := Query('DELETE FROM `' + Table + '` WHERE ' + Condition); 315 DbRows.Free; 307 316 end; 308 317
Note:
See TracChangeset
for help on using the changeset viewer.