[FX.php List] Cycle through DB

Erik Andreas Cayré erik at cayre.dk
Sat Aug 19 01:50:57 MDT 2006


Den 18/08/2006 kl. 15.27 skrev Dr. Andrew J. Fallon:

> I am trying to write a script that will iterate through a file so  
> that I can pull specific data out and put it into a MySQL DB.
>
> MY question is: Is there a way to cycle through the DB one record  
> at a time starting from Record(First) to Record(Last)?
How many records are in the FM DB?
-If there aren't too many records, you might get away with FMFindALL 
() and a foreach() loop

Do you have direct access to the DB using FM client?
-It may be easier to find/sort/export records i FM client, and import  
these to MySQL (via .csv or similar text file)

Den 19/08/2006 kl. 2.17 skrev Jonathan Schwartz:

> - Creating a serialized record number field in the FMP file, and  
> have a php script query that record and repeat the query/write  
> process for each record i++ record. or..
> - Reading the first record found in a set and then marking it  
> "done" after each cycle, until all records have been processed.

If the DB is live while this is being done, changes may occur to the  
dataset, while the script is executing...



---
Erik Andreas Cayré
Spangsbjerg Møllevej 169
DK-6705 Esbjerg Ø

Home Tel: +45 75150512
Mobile: +45 40161183

»If you can't explain it simply, you don't understand it well enough.«
-- Albert Einstein

»If you don't have time to do it right, when will you have time to do  
it over?«
-- John Wooden, basketball coach


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1856 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20060819/c0743ee1/smime.bin


More information about the FX.php_List mailing list