Changeset 34 for trunk/Application/Clients/UChronisClientMySQL.pas
- Timestamp:
- Nov 24, 2011, 2:06:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Clients/UChronisClientMySQL.pas
r33 r34 61 61 Filter := ''; 62 62 for I := 0 to AList.ColumnsFilter.Count - 1 do 63 Filter := Filter + AList.ColumnsFilter[I] + ',';64 Delete(Filter, Length(Filter) , 1);63 Filter := Filter + '`' + AList.ColumnsFilter[I] + '`, '; 64 Delete(Filter, Length(Filter) - 1, 2); 65 65 end else Filter := '*'; 66 66 if AList.ConditionUse then Condition := '`' + AList.ConditionColumn + '` = "' + 67 67 AList.ConditionValue + '"' 68 68 else Condition := '1'; 69 Database.Select(DbRows, AList.ObjectName, Filter, Condition); 69 Database.Query(DbRows, 'SELECT ' + Filter + ' FROM `' + AList.SchemaName + '`.`' + 70 AList.ObjectName + '` WHERE ' + Condition); 70 71 AList.Objects.Clear; 71 for I := 0 to DbRows.Count - 1 do 72 for I := 0 to DbRows.Count - 1 do begin 72 73 NewObject := TObjectProxy.Create; 73 74 NewObject.Client := AList.Client; 74 75 NewObject.Properties.Assign(TDictionaryStringString(DbRows[I])); 75 76 AList.Objects.Add(NewObject); 77 end; 76 78 finally 77 79 DbRows.Free;
Note:
See TracChangeset
for help on using the changeset viewer.