How can I execute a MySQL query on line 7 to get the new content WHERE pagenumber=-1
I cannot seem to use $pagenumber-1 in WHERE clause because it will always equal to 7-1=6 for example.
This is the button:
Code: Select all
echo "<img src='images/main/previous.png' border='0' onclick='ajaxLoadprevious();'>";Code: Select all
<script type="text/javascript">
function ajaxLoadprevious() {
var ed = tinyMCE.get('content');
ed.setProgressState(1);
window.setTimeout(function() {
ed.setProgressState(0);
ed.setContent('MYSQL QUERY HERE');
}, 1000);
}
</script>