G
Gary Dolliver
Hi all,
I am attempting to receive information from a MySQL DB, which I send up a
zip code (PHP get) and then receive back a string of all records that match.
The problem is I need to separate them into records to be inserted into an
address table.
An example of the return string would be:
&school_name1=EAST ELEM SCHOOL&address1=1234 EAST
AVE&city1=AURORA&school_name2=SOUTH ELEMENTARY SCHOOL&address2=5 SOUTH
ST&city2=AURORA&school_name3=WEST ELEMENTARY SCHOOL&address3=2 WEST
WAY&city3=AURORA&school_name4=NORTH SCHOOL&address4=15 NORTH
AVE&city4=AUROR&n=4&errorcode=0&
I would like this to be inserted into a table that would then have 4 (or
however many records come back) records, with the name, address, and city as
columns. I can parse the string to get this information out, but how would I
make a separate record for each school?
I figure it would be a loop of sorts, but am unsure where to begin (what
would I use to trigger to go to the next record?), any code or guidance that
can be provided would be very helpful, thanks
-gary
I am attempting to receive information from a MySQL DB, which I send up a
zip code (PHP get) and then receive back a string of all records that match.
The problem is I need to separate them into records to be inserted into an
address table.
An example of the return string would be:
&school_name1=EAST ELEM SCHOOL&address1=1234 EAST
AVE&city1=AURORA&school_name2=SOUTH ELEMENTARY SCHOOL&address2=5 SOUTH
ST&city2=AURORA&school_name3=WEST ELEMENTARY SCHOOL&address3=2 WEST
WAY&city3=AURORA&school_name4=NORTH SCHOOL&address4=15 NORTH
AVE&city4=AUROR&n=4&errorcode=0&
I would like this to be inserted into a table that would then have 4 (or
however many records come back) records, with the name, address, and city as
columns. I can parse the string to get this information out, but how would I
make a separate record for each school?
I figure it would be a loop of sorts, but am unsure where to begin (what
would I use to trigger to go to the next record?), any code or guidance that
can be provided would be very helpful, thanks
-gary