Prev: Broken query
Next: NULL to 0
From: listread on 15 Jul 2010 19:38 We need to load a page which performs some tasks specific to each record, including writing some results to another table. I have tried to place a page loading script within the while loop that creates the table, but it seems to only load the page on the last record in the table. Is there a better way to do this? Thanks!
From: Chris on 15 Jul 2010 19:42 On 16/07/10 09:38, listread wrote: > We need to load a page which performs some tasks specific to each > record, including writing some results to another table. > > I have tried to place a page loading script within the while loop that > creates the table, but it seems to only load the page on the last record > in the table. > > Is there a better way to do this? Why does it need to call a page to do all the work? If it was just a function call you'd be off and racing already. -- Postgresql & php tutorials http://www.designmagick.com/
From: Chris on 15 Jul 2010 21:03 On 16/07/10 09:51, listread wrote: > On 7/15/2010 6:42 PM, Chris wrote: >> On 16/07/10 09:38, listread wrote: >>> We need to load a page which performs some tasks specific to each >>> record, including writing some results to another table. >>> >>> I have tried to place a page loading script within the while loop that >>> creates the table, but it seems to only load the page on the last record >>> in the table. >>> >>> Is there a better way to do this? >> >> Why does it need to call a page to do all the work? If it was just a >> function call you'd be off and racing already. >> > The page I want to call is a little involved. It makes a geocode request > from Google Maps and then parses the resulting json code and then writes > the parsed data to another table. I guess it could be done with > functions, but the other page was already written... :-) I guess you could do a file_get_contents on the url of the page. > If I call a function, will the while loop wait for the function to > complete before going to the next row? Yes. -- Postgresql & php tutorials http://www.designmagick.com/
From: listread on 15 Jul 2010 22:04 On 7/15/2010 8:03 PM, Chris wrote: > On 16/07/10 09:51, listread wrote: >> On 7/15/2010 6:42 PM, Chris wrote: >>> On 16/07/10 09:38, listread wrote: >>>> We need to load a page which performs some tasks specific to each >>>> record, including writing some results to another table. >>>> >>>> I have tried to place a page loading script within the while loop that >>>> creates the table, but it seems to only load the page on the last >>>> record >>>> in the table. >>>> >>>> Is there a better way to do this? >>> >>> Why does it need to call a page to do all the work? If it was just a >>> function call you'd be off and racing already. >>> >> The page I want to call is a little involved. It makes a geocode request >> from Google Maps and then parses the resulting json code and then writes >> the parsed data to another table. I guess it could be done with >> functions, but the other page was already written... :-) > > I guess you could do a file_get_contents on the url of the page. > >> If I call a function, will the while loop wait for the function to >> complete before going to the next row? > > Yes. > I'll see if I can imbed the page as functions...
|
Pages: 1 Prev: Broken query Next: NULL to 0 |