> function.c
Nuevas funnciones y metodos para localizar registros en una consulta
New functions and Method to locate record
METHOD Find( aValues, aFields, nStart, nEnd, lRefresh )
METHOD Find( aValues, aFields, nStart, nEnd, lRefresh )
aValues = Array de datas a buscar / data array to seek
aField = Array de campos que filtrara la busqueda / Field array to filter seek
nStart = Registro comienzo para buscar / start record to seek
nEnd = Registro final a bsucar / end record to seek
Este metodo no tiene ninguna restriccion, buscara de forma secuencial dentro de la consulta activa, devolvera el primer registro que satisfaga la condicion de busqueda
this method dont have any restriction, will seek sequentally inside active query, return the first record that, will return the first record that satisfies the search condition
METHOD Locate( aValues, aFields, nStart, nEnd, lRefresh )
igual al metodo Find, la diferencia es, este metodo es mas rapido y para obtener los resultados deseados, debera estar la consulta ordenada de igual forma a los campos a buscar
ejemplo.
si desea buscar por field1, field2 y field3 la consulta debera estar ordenada ORDER BY field1, field2, field3
same Method Find, the difference is: this method is more fast, to get better result, the query should be order same to field seek
ie.
if you want seek field1, field2 and field3 the query should be order like ORDER BY field1, field2, field3
sample:
oQry = oServer:Query( "SELECT * FROM clientes ORDER BY first, last " )
oQry:Find( { "Vincent", "Brook" }, {"first", "last" } )
oQry:Locate( { "Vincent", "Brook" }, {"first", "last" } )
No hay comentarios:
Publicar un comentario