drayarms Posted September 20, 2011 Share Posted September 20, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/247536-need-algorithmic-help-with-a-mysql-question/ Share on other sites More sharing options...
fenway Posted September 20, 2011 Share Posted September 20, 2011 If you don't know, how can we? Quote Link to comment https://forums.phpfreaks.com/topic/247536-need-algorithmic-help-with-a-mysql-question/#findComment-1271148 Share on other sites More sharing options...
requinix Posted September 20, 2011 Share Posted September 20, 2011 You're talking about something more complicated than simply hiding the seven extra comments on load and showing them when they click the button? No AJAX needed? Quote Link to comment https://forums.phpfreaks.com/topic/247536-need-algorithmic-help-with-a-mysql-question/#findComment-1271161 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.