Display random mysql record after every 8 seconds???

Looking to see if I could get some suggestions on how to
achieve the following. I want to display the contents of random
mysql records every 8 seconds but I am not sure how to code the
every 8 seconds.
Any suggestions?

cdembek wrote:
> Looking to see if I could get some suggestions on how to
achieve the following.
> I want to display the contents of random mysql records
every 8 seconds but I am
> not sure how to code the every 8 seconds.
Apart from the fact that running a MySQL query every 8
seconds is likely
to use a lot of resources and probably result in an intensely
annoying
web page, you are attempting something for which server-side
programming
is not designed. A dynamic page using PHP (or any other
server-side
language) is created by sending a request from the browser to
the
server, where it queries the database, and sends back the
result. So, to
do what you want, you need to send a new request every 8
seconds.
The only way to guarantee that it will work is to send a
request for the
full page, using the refresh meta tag. This is extremely
wasteful of
resources, and is likely to drive visitors mad, as the page
rebuilds
seven times a minute. To rebuild just the part of the page
that you want
to change, you would need to use Ajax or Flash.
A more sensible approach might be to send one query to the
database, and
store a large number of results in an array. You could then
use
JavaScript and DOM manipulation to select an element from the
array at
random. However, like Ajax, this approach depends on
JavaScript being
enabled in the browser. You would also need considerable
scripting
skills to set it up.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Whenever I access my Hotmail inbox to open a new mail it starts reloading the mail after every second unless i switch it to full view?

    whenever I access my Hotmail inbox to open a new mail it starts reloading the mail after every second unless i switch it to full view. Kindly help me to solve this continuous problem.

    I confirm this is a known bug and Microsoft are working on a fix. They plan to fix this before Firefox 4 reaches release candidate phase.
    A workaround is to change a preference in Firefox:
    # Type '''about:config''' into the location bar and press enter
    # Accept the warning message that appears, you will be taken to a list of preferences
    # Locate the preference '''html5.enable''' and double-click on it to change its value to '''false'''
    If you do this, remember to set the preference back to true by double-clicking on it again when Firefox 4 release candidate is made available, the bug should be fixed by then.

  • Mac keep freezing after every second.

    Hello everyone  this problem started happening yesterday.  Every time when I type a few seconds it freezes.  I have applications like Abelton live and using other game applications and they are freezing after every second i move the mouse or something.  Cant tell if this a hard drive related or the software any help thanks

    Remove "Kaspersky Security," if it's installed, by following the instructions on this page. If you have a different version of the product, the procedure may be different. The product includes a Safari extension that may not be removed by the uninstaller.
    Back up all data before making any changes.

  • Audacity randomly stops recording after a few seconds

    I've been trying to record a few things with audacity, which has generally worked pretty well for me in the past.
    However, whenever I try to record a second track, it only records for a second or so after I hit the record button, and then randomly stops, although the cursor keeps on moving forwards and the meter keeps showing the input.
    I haven't been able to find any reason why it would be doing this, and it is EXTREMELY fustrating. It has also done this when I tried to record for the first time in a new project, but I switched a few settings on and off again and it worked for some reason. Can anyone offer any help?

    Is this still a problem for anyone?  I came here looking for help and found more questions, so I started randomly playing with the input settings.  I have an Ensoniq (es1371).  Choosing OSS/DSP gave me an error trying to read the device; choosing hw0:0 or 0:1 had it stop recording at just over 0.6 seconds; turning software playthrough on or off had no effect.  What finally worked was "ALSA:Default" and use alsamixer to control the recording source.
    At the risk of being branded a linux hater, I should mention that the same hardware under Windows "just works" without any changes needed in the input settings on my part.  I fired up Windows 7 in a vmware window - so not only did the Windows environment work correctly out of the box, that was with the additional layer of alsa -> vmware -> windows.
    Last edited by WyoPBS (2009-06-06 18:51:54)

  • STP stops recording after a second or two...

    Hi, so this is new to me, I am trying to record, from any source and STP just stops recording affter a second or two. This never happened before. I am guessing there is a setting somewhere. The audio that is recorded sound fine. Any ideas?
    Thanks!
    David

    This is happening to me too, although it never records more then a second, it is usually less. Does anyone know how to solve this problem?

  • Mac Mini display randomly blanks for a few seconds....

    The Mac Mini that I bought a few weeks ago randomly goes blank for a couple of seconds at a time (black screen). There is no regular interval between occurrences -- sometimes it can go an hour or more between "spasms," other times it may blank two or three times within a ten minute span. Occasionally, it comes back to a snowy screen, that lasts for another couple of seconds, before returning to normal.
    I have searched online, and have seen this mentioned in reference to the nVidia 9400, which is the graphics adapter in this model Mac Mini. I have tried both the mini-DVI to DVI adapter, as well as the mini-display port to DVI adapter, as was suggested in one post. The occurrences are less frequent with the mini-display port to DVI adapter, but they still occur with an unacceptable frequency (if occurring at all is acceptable). I have also tried three different flat-panel monitors (Samsung, LG, and Acer), with the same results.
    Has anyone else experienced this problem? Does anyone know of a solution, other than returning the computer?
    Thanks.

    Yes. This is exactly the issue I'm having. I'm both sad, and happy I'm not alone!
    I added this message in another post before I found this one.
    "I'm using a 27 inch ASUS LCD over DVI from the Mac Mini. It doesn't matter if I use a mini display port to DVI adapter or an HDMI to DVI adapter, the screen will randomly "Flicker" the image into a reversed color image thats slid to one side a bit. Other times it will go black for half a second randomly. And then, after a group of close together "Flickers" it will on occasion go into the "Colored static" issue like you are experiencing.
    I can either power cycle the monitor or the Mac to solve the issue. I assume this solves the issue because it forces the Mac to handshake with the DVI connection again, and temporarily resolves it. Some times it will only "Flicker" one or two times a day, other times it will do it in cascades until it goes into the "Colored noise" problem again, which I have only seen a half dozen times in the last few weeks.
    The Mac Mini did not do this initially, so I'm thinking it's from one of the boot camp updates? I hope it is, because that means it can be fixed with a patch."
    I'll drop apple some feedback. Thanks for the link!

  • Display keeps dimming after 30 seconds, randomly!

    After 30 seconds or so, the brightness will dim. I know this can be turned off (at least I think), but I can't figure out what is causing it. It also seems to be random, but that may just be my imagination.
    How can I keep my display from dimming after 30 seconds? Thanks.
    Ryan

    You might try to reset the SMC and/or PRAM.

  • I am trying to generate an array of 30 random numbers. after every 5 readings a new vi should open and tell the user that 5 readings has been completed. and again carry on with the generation of array.

    since i do not have a transducer now, i am currently generating an array of 30 random numbers. after every 5 readings a warning should be given to the user that 5 readngs are complete. this cycle should repeat. the array size is 30.
    please help me out,  waiting for reply asap.
    once i have the transducer, i will be taking 30 analog samples and then after every 5 smaples that wraning will be displaye din a new VI
    Solved!
    Go to Solution.

    Use a while loop with a time delay representing your sampling period.
    Use the count terminal to check if equals 4, so 4th iteration=5th sample.
    Use a case structure. The true case will only be executed on the 4th iteration.
    In the true case place a subVI  with your desired message in the front panel. Go to the VI properties window and set "open front panel when called".
    The closing condition of the warnign is not giving in your description.
    Consider that rather than usign a subvi for this, you could use the "One/Two/Three button dialog" or "display message" vis at the "dialog and user interface" pallete.
    Please give it a try and send your own VI. Do not expect us to provide a working solution.
    Regards,

  • HT204380 My phone (iPhone 5S) getting green display after one second going to switch off then automatically ON during FaceTime

    My iPhone (iPhone 5S) getting green display after one second going to switch off then automatically ON during FaceTime call. My OS version now 7.0.4. I think recent update actually to fix the above issue but still continues.

    Similar issue Andrew.  After installing 8.0, the IOS deleted 225 songs from one of my playlists, and I'm still "recalling"  songs that are no longer in my Music Library.  Fortunately, although the playlist of 235 had only 6 songs left on it ( on my  Mac), the Playlist was not erased from my I -Phone.  I was able to recreate the Playlist on my Mac, using the intact playlist on my phone.  When I synched however, I was back to square one.  I went to the Apple store, and I had to reset the phone .  We also downloaded IOS 8.02.  They saved my playlist in the Cloud, deleted it from my Mac, then synched it.  Lo and behold, the playlist I recreated on my Mac, synched to my I Phone.  After the reset, I had like 11GB of free space.  (Its been 5 days since the "reset" and the number of GBs fluctuates from day to day !!)
    When I got home from the Apple store I spent after  hours reinstalling all the apps, synchng the phone to the Bluetooth in my car ( you know the rest of the saga) , I purchased a song from I Tunes.  I "drag and dropped" it into a Playlist, and synched.  Didn't work.  Song shows in "Recently Added", but the drag and drop feature doesn't work.  Bottom line,  I'm not willing to "reset" my phone every time I add a song !  I've tried any number of fixes posted to this support community, but none have worked for me.
    Furthermore,  it took me 3 hours to get the phone re-synched to the Bluetooth system  in my car.  However every time I connect to "Bluetooth Audio", the system needs to "find" and "reconnect to" my phone.    If you ( or anyone else ) finds  something that might work for both the music synch and /or the Bluetooth, I'd appreciate your input. 
    Thanks, Lorenzo

  • Need Count of Displayed records after suprresion

    Hi All,
    My question is looks very simple but it made me very tough to get it. pls help me if you have any clue.
    I have a report having 20 detail records from Database.
    I used some condition at Section expert to suppress some data, after that I have only 10 records as report out put.
    Now, at the report footer I need the count of the records.So, when I use count function its showing 20 instead of 10.
    How to get the count of available records after suppressing.
    Thank you,
    Krishna Pingali

    Hi Krishna!
    I would try using a conditional Running Total formula to add each record that does not fit the suppression criteria, and then a display formula to display the final total.
    Ex -
    @Non-Suppressed Count Calc
    WhilePrintingRecords;
    NumberVar NSC;
    If <> <suppression criteria> Then NSC := NSC + 1
    Else NSC := NSC
    @Non-Suppressed Count Display
    WhilePrintingRecords;
    NumberVar NSC;
    NSC
    Place the first formula in your Details Section and the Second in the appropriate Footer Section.
    Hope that helps!  

  • Hi.. I got some problem  when i want to type something , letters are not displaying immediately , they are displaying after some seconds. can you help me out

    Hi.. I got some problem  when i want to type something , letters are not displaying immediately , they are displaying after some seconds. can you help me out

    Hello:
    I am not being critical, but you seem to want Safari to behave exactly like Chrome.  Every software developer has a plan.  Sometimes features in one product parallel other products - sometime not.  There might be some things available that would help you.  Do not hold your breath, however, for suggestions from people who use these forums.  Most of us use (and like) Apple products.  If you wish to make suggestions for future improvements, there is a feedback area on this web site that Apple employees read/review.
    Candidly, your approach would be akin to suggesting that Apple emulate the "features" in Windows (heaven forbid).
    I use Safari (and have for years).  I use Firefox (not a bad product) as my alternate browser.
    Sorry for what appears to be a pedantic lecture.  However, I think most of us adapt to different products if we really want to use them.
    Barry
    Message was edited by: Barry Hemphill

  • My iPad 2 freez / unresponsive for a second after every five second

    My iPad 2 freez / unresponsive for a second after every five second.

    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • Recording on GarageBand goes crackly after 30 seconds?

    I have started using a studio projects microphone called an LSM (USB) with GarageBand and after 30 seconds recording the audio goes crackly and distorted until I re-start GB, thought it was cause by to much power consumption from the USB mic so I tried a HP USB 2.0 powered hub but still no joy!!
    Can anyone help?
    Thanks
    Mark

    If you have reset by holding down on the sleep and home buttons until the Apple logo appears and that doesn't help, try closing the app completely, then reboot the iPad. If that doesn't work, you might want to consider deleting the app and download it again. Backup your iPad with iCloud or iTunes and sync with iTunes if you delete the app so that you can restore the PDF files and books to the device.
    Go to the home screen first by tapping the home button. Double tap the home button and the recents tray will appear with all of your recent apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
    You might have a PDF file that is corrupt and it might be causing this and if that's the problem, you will ultimately have to track down which file it is and delete it or this may never get resolved. That is probably unlikely, but it is a possibility nonetheless.

  • Forced second restart required after every s/w upgrade

    As the subject title says...
    on one of my two G4 Macs, after every/any software update that REQUIRES a restart, the restart never completes on it's own. I can actually hear the HD NOT having any disk activity. It just hangs when the screen goes from grey to blue with the spinning sprocket thingy.
    If I hold the power button in until it forces a restart (iBook) it then reboots fine and the second attempt. Why?Why?Why?
    This started maybe 2 years ago and never went away. It's just annoying more than anything else.

    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc that came with your computer, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot.
    The usual reason why updates fail or mess things up, is if Permissions are not fixed before & after every update, with a reboot... you may get a partial update when the installer finds it doesn't have Permissions to change one obscure little part of the OS, leaving you with a mix of OS versions.
    Some people get away without Repairing Permissions for years, some for only days.
    If Permissions are wrong before applying an update, you could get mixed OS versions, if Directory is the slightest messed up, who knows!
    If many Permission are repaired, or any Directory errors are found, you may need to re-apply some the latest/biggest updates.
    May even need to do an Archive and Install if you have room on the HD...
    http://docs.info.apple.com/article.html?artnum=107120
    I only use Software Update to see what is needed, then get them for real via...
    http://www.apple.com/support/downloads/

  • Commit in procedures after every 100000 records possible?

    Hi All,
    I am using an ODI procedure to insert data into a table.
    I checked that in the ODI procedure there is an option of selecting transaction and setting the commit option as 'Commit after every 1000 records'.
    Since the record count to be inserted is 38489152, I would like to know is this option configurable.
    Can i ensure that commits are made at a logical step of 100000 instead of 1000 records?
    Thank You.
    Prerna

    recently added on this
    http://dwteam.in/commit-interval-in-odi/
    Thanks
    Bhabani
    http://dwteam.in

Maybe you are looking for

  • Including output in a JSP page from a separate Web App

              I seem to be having a bit of a problem including the output from a sevlet invoked           from a separate           Web Application in the same domain. I have a servlet callsed 'WebApp2\Web-inf\classes\packagename\targetServlet'.         

  • Regarding BPM alert

    HI All , 1)pls let me know what is the use of optional subsequent activitys in the container elements of the Alert category Alertcategory properties|container|optional subsequent activity 2)what is URL of subsequent Activitys. Actually i am raising a

  • Copy and paste feature request

    Please God... uh, Mr. Jobs, When in text edit mode and while viewing web pages etc., please add a button with a clipboard icon that switches into a text select mode that allows you to drag over text to select as well as double and triple tap sentance

  • Enhancement for MIR7 - MIRO

    Dear Friends,   I want to call an enhancement when posting a parked invoice document in tcode MIRO. I want to do some processing after the document is saved in the database. This invoice document will be initially parked using tcode MIR7. I tried wit

  • Network OK but not a single APP on ATV can play more than 1 second

    My ATV 3rd gen (full HD) is at latest update, network is OK (I see movie trailers and all) but ALL applications (Netflix, Vimeo, InternetRadio, PodCasts, etc) cannot play more than a fraction of a second then it takes me back to that APP main screen.