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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.