Struggling with $WPDB
-
Created a separate table in the database called fts_groups, just trying to get all the data from it and can’t get it working for the life of me, any ideas where I’m going wrong?
function listspares() { $q = "SELECT * FROM fts_groups"; $result = $wpdb->get_results($q); if ($result) { foreach ($result as $r) { $GroupID = $r->GroupID; $GroupThumb = $r->GroupThumb; $GroupImage = $r->GroupImage; $GroupName = $r->GroupName; ?> <a href="<?php get_option('home');?>/wp-content/themes/ft/modals/grouppage.php?ID=<?php echo $GroupID;?>" id="inline" > <img src="<?php get_option('home');?>/<?php echo $GroupThumb; ?>" /> <p><?php echo $GroupName; ?></p> </a> <?php } } else { ?>No Spares Found<?php } }
Thanks in advance,
Kyle
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Struggling with $WPDB’ is closed to new replies.