A function like this is showing comments on my website
$retrieve = $con->select2("*", "`comments`", "page_id=" . $page_id, "`comments`.`id` DESC LIMIT ".$con->comnt_limit);
where
$comnt_limit = 5;
I want that when I click on an anchor like this
<a href="" id="show_all">Show all Comments</a>
my $comnt_limit = $show_all where i have $show_all variable which contains total number of rows in my mysql table and now the above function that retrieve my data run and show all comments on the same page
cf. http://api.jquery.com/jQuery.ajax/ for the options.
And instead of settings the limit to a high number you should remove it completely.