I have a query that returns a large list, how make the paging this it?
-
how make the paging this it?
<?php global $wpdb; $result = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."mytable ORDER BY date_added DESC" ); ?> <div class="wrap"> <table class="widefat"> <thead> <th>User</th> <th>IP</th> </thead> <tbody> <?php foreach ( $notifications as $notification ) : ?> <tr> <td style="padding:5px;"><?php echo $result->user; ?></td> <td style="padding:5px;"><?php echo $result->ip; ?></td> </tr> <?php endforeach;?> </tbody> <tfoot> <th>User</th> <th>IP</th> </tfoot> </table> <p> </p> </form> </div> <?php } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘I have a query that returns a large list, how make the paging this it?’ is closed to new replies.