Need to get data from plugin table
-
Hi,
I have been battling this for hours and canot find the solution
I need to return some text from a plugins table using the following php
<?php $post_id = get_the_ID(); echo $wpdb->get_var( $wpdb->prepare(“SELECT message_before FROM {$wpdb->prefix}mlw_quizzes WHERE quiz_id = %d”, $post_id ) ); ?>
I know the variable works as
<?php echo $post_id= get_the_ID(); ?>
works
I’ve resused similar code and just cannot get it to work.
Any help appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.