Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_book_comment($book_id) {
- global $wpdb;
- $table_name = $wpdb->prefix . 'posts';
- $query = "SELECT `post_content` FROM $table_name WHERE `ID` = $book_id;";
- $result = $wpdb->get_results($query, ARRAY_N);
- if (!empty($result)) {
- return $result[0][0];
- }
- else {
- return '';
- }
- }
Add Comment
Please, Sign In to add comment