滚动AJAX代码问题

I've been looking for some kind of tutorial/info about how to create a very simple horizontal scrolling AJAX Ticker that pulls text to display from a MySQL database, however the only information I can find is very limited and not related to database stuff, it only reads from text files.

Does anyone know how to do this, or knoww of any good resources about this?

Thanks!

This is a pretty broad question, but your solution will end up looking something like this:

  1. Have a server somewhere that your JavaScript will hit (via AJAX) to retrieve the data you intend to 'tick'.
  2. Write some simple PHP or whatever to serve up the data, formatted as you'd like, and place it on the server mentioned in step 1.
  3. Write your JavaScript to access the server at a given interval using setTimeout or setInterval, process the results and add them to whatever data structure powers the ticker.
  4. Build your HTML to contain the ticker and wire it up to one of the many jQuery plugins available that will let you do the ticker bit*

*Yes, I realize you didn't specifically mention jQuery in your question. If you're using a different framework, Google that one instead. Point is, you should almost certainly use some type of framework for this, IMO.

If you have more specific implementation questions, fire away. Good luck!