I have installed wordpress with question2answer as a single signon. The database created by wordpress with wp_ prefix and question2answer prefix is qa_
Now wordpress tables doesnt required to define prefix with $wpdb-> but how can I get question2answer table without query with prefix like I prefer something like as below
$titles = $wpdb->get_results("
SELECT title
FROM qa_posts // with qa_ prefix
");
Its giving output of the title but i want something like below code where I dont have to define qa_ prefix same like wordpress default tables
$titles = $wpdb->get_results("
SELECT title
FROM posts // without prefix
");
Write a function that uses $wpdb->prefix as a fallback. Something like this: