Jump to content

Need algorithmic help with a mysql question.


drayarms

Recommended Posts

Hello folks, this is a purely conceptual question.  Well I'm trying to display results from a mysql select query.  I want to limit the number of returned rows to say 3, which would be what the user sees when he first loads the page.  Then I want him to be able to increase the number of returned rows to say 10 simply by clicking a button.  Something similar to facebook comments.  The way I tried to solve this problem was to use a variable to set the limit on the mysql query, then AJAX to send a request to the server, to change the value of this variable when an onclick event takes place.  This didn't seem to work.  I don't know if it is because I didn't get the AJAX coding right, or  simply because that concept is just plain wrong.  If the latter is true, can someone give me any fresh ideas as to how to go about this problem? Thanks.

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.