paruby Posted March 2, 2006 Share Posted March 2, 2006 I am creating an array from data from a mssql SELECT statement. I have a total of 530 rows of data returned that I am then inserting into an array. I want the screen to update the number of rows added to the array, so it loks like an rolling update, ie. print: "1 of 530 rows added"; then print: "2 of 530 rows added"... print "530 of 530 rows added". But I want it to "overwrite" the previous line so it looks like the fisrt number is changing... Seems easy, but can it be done?ThanxPete Quote Link to comment https://forums.phpfreaks.com/topic/3954-show-running-result-of-array-creation/ Share on other sites More sharing options...
wickning1 Posted March 3, 2006 Share Posted March 3, 2006 Is this a web page or a command line script? You can't do that with a web page. On the command line you may be able to use fseek() and fwrite() on STDOUT. I've never tried it though. Make sure it's automatically flushing output.You can also try clearing the screen with a system command just before a write. Quote Link to comment https://forums.phpfreaks.com/topic/3954-show-running-result-of-array-creation/#findComment-13762 Share on other sites More sharing options...
paruby Posted March 3, 2006 Author Share Posted March 3, 2006 Thank you for the reply. i am trying to do this on a web page, so I guess te answer is no. At least I know... Quote Link to comment https://forums.phpfreaks.com/topic/3954-show-running-result-of-array-creation/#findComment-13795 Share on other sites More sharing options...
wickning1 Posted March 3, 2006 Share Posted March 3, 2006 If it's a really long process, you probably don't want to make your user(s) wait. You should be able to send them to an intermediate page while they wait, one with an animated gif or something, and set it to redirect to a "completed" page after a period of time. Quote Link to comment https://forums.phpfreaks.com/topic/3954-show-running-result-of-array-creation/#findComment-13834 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.