muffinresearch
MIS
I have a PHP script which has loop that writes the file names of a directory into my database. (I have paraphrased the script into english so as to not get bogged down with PHP syntax)
Either of the filesnames start with an a or a b. There are identical apart from the prefix letter (a or b!)
My script says:
does this filename begin with an "a"
if so INSERT it into this database column.
else
does this filename begin with a "b"
if so INSERT it into this column.
etc.
The problem is, say if there are two filenames beginning with "a" and two filenames beginning with "b"
the first two "a" filenames are entered into rows 1 and 2. And the "b" filenames are entered into rows 3 and 4.
My question is how can I avoid this and how can I get them to be entered into the same rows Whilst keeping the if and else structure.
Either of the filesnames start with an a or a b. There are identical apart from the prefix letter (a or b!)
My script says:
does this filename begin with an "a"
if so INSERT it into this database column.
else
does this filename begin with a "b"
if so INSERT it into this column.
etc.
The problem is, say if there are two filenames beginning with "a" and two filenames beginning with "b"
the first two "a" filenames are entered into rows 1 and 2. And the "b" filenames are entered into rows 3 and 4.
My question is how can I avoid this and how can I get them to be entered into the same rows Whilst keeping the if and else structure.