Jump to content

Printing DB data separetly


pacome

Recommended Posts

hi... I'm trying to program a small game for myself...

I've got some data in a DB which I extract within a WHILE loop, but I would like the data extracted to print slowly, not all at once! let's evey 30 seconds interval...

 

while ($cont < 8){

 

extract data;

print one of the 8 every 30 seconds;

}

 

¿which function or line does this type of thing?

 

thank you.

Link to comment
https://forums.phpfreaks.com/topic/49175-printing-db-data-separetly/
Share on other sites

 

¿which function or line does this type of thing?

 

In PHP, none.

 

PHP runs on the server and delivers the whole page when the script has executed.

 

To do what you you want would require a javascript (client-side) timer event and either a javascript array generated by the PHP code or an AJAX solution to fetch 1 st record, then on next call, get first 2 records etc

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.