Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding with MySQL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00944377
Message ID:
00944435
Vues:
24
Hi Jojo,

Thank you for your reply,

*****
SQLEXEC(Con, 'SELECT * FROM PRODUCTS ORDER BY PRODID','RV_PRODUCTS')
SELECT RV_PRODUCTS
SEEK(cSearch)
&&INDEX ON PRO_CODE TAG P_CODE
&&INDEX ON PRO_NAME TAG P_NAME
&&INDEX ON SUBS(PRO_CODE,1,3) + STR(PBARCODE) TAG P_BARCODE
&&SET ORDER TO P_CODE
*****
Question 1.
Is it prossible to put different key(order) into 'PRODUCTS'.
It will make my system slow, if i need to load the data from MySQL, and make the index on it. ?
===> You can retrieve the data in sorted order by placing the ORDER phrase.
e.g. if you want to the returned results set to be in order by product id,
SQLEXEC(Con, 'SELECT * FROM PRODUCTS ORDER BY P_CODE','RV_PRODUCTS'
if let say you want to set the order to P_NAME
you just issue an index on command into your local data directory..

Select('RV_PRODUCTS')
Index on product_name to data\p_name

*/* this in sorted by product name..
SQLEXEC(Con, 'SELECT * FROM PRODUCTS ORDER BY P_NAME','RV_PRODUCTS'


I reading some book about SQL, They said it is the fast way to seek record.
but i think that... it will make the system running slowly on data entries and user friendly.

==> for data entries, e.g. insert, no need to fetch the whole records.

Note: after every connection to your mysQL database and retrieved your records/result sets, always disconnect from the data source in order not to blot/clogged your system resources..
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform