• I am trying to do something which I think should be really simple, but it is not working. I want to pull a specific piece of data from one of my tables and display it within one of my wordpress pages.

    I tried inserting this code in the page editor:

    <?php $bbym_qty = $wpdb->get_var("SELECT quantity FROM $wpdb->wp_yak_product_detail WHERE post_id=289"); echo $bbym_qty; ?>

    But it just echoed everything after get_var.

    I’m really at a loss here. Can this be done?

  • The topic ‘Trying to pull datum from table’ is closed to new replies.