0

I know how to display the WordPress database table with Foreach loop, but I want to add pagination to the output HTML table so that it should show only the first 100 results then I can use pagination options for further output (if I can use something like $xrd_match = $wpdb->get_results ( "SELECT * FROM xrd_data_match LIMIT $next, 10" );).

<?php
global $wpdb;
$xrd_match = $wpdb->get_results ( "SELECT * FROM xrd_data_match" );
foreach ( $xrd_match as $print )   {
?>
<tr>
<td><?php echo $print->order_id;?></td>
<td><?php echo $print->match1;?></td>
</tr>
<?php }

0 Answers0