muffinresearch
MIS
I am starting with a datbase structure like this:
ID | filename | info1fromfile | info2fromfile
-------------------------------------------------------
1 file1
2 file2
My query loops through the filename column and then opens each file listed in turn.
Whilst open it extracts strings from the text files.
These are to be entered into the rows relative to that filename. So I should end up with this:
ID | filename | info1fromfile | info2fromfile
-------------------------------------------------------
1 file1 someinfo1 someinfo2
2 file2 someinfo3 someinfo4
To be able to run the UPDATE I need to know which row I am currently on. Is there a way to do that as the filename QUERY pulls out the filenames?
I guess Ideally I need to know what ID we are on.
Also is there an easy way to count how many filenames have been looked at so I can use LIMIT so that the UPDATE statement doesn't try to UPDATE the whole database every time. (The number of files will get larger over time so I only want to update the rows necessary!)
ID | filename | info1fromfile | info2fromfile
-------------------------------------------------------
1 file1
2 file2
My query loops through the filename column and then opens each file listed in turn.
Whilst open it extracts strings from the text files.
These are to be entered into the rows relative to that filename. So I should end up with this:
ID | filename | info1fromfile | info2fromfile
-------------------------------------------------------
1 file1 someinfo1 someinfo2
2 file2 someinfo3 someinfo4
To be able to run the UPDATE I need to know which row I am currently on. Is there a way to do that as the filename QUERY pulls out the filenames?
I guess Ideally I need to know what ID we are on.
Also is there an easy way to count how many filenames have been looked at so I can use LIMIT so that the UPDATE statement doesn't try to UPDATE the whole database every time. (The number of files will get larger over time so I only want to update the rows necessary!)