Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sample_shortcode ($post) {
- global $wpdb;
- $query = "SELECT *
- FROM abc_sample
- LEFT JOIN (users)
- ON (abc_sample.user_email=users.user_email)";
- $fff = $wpdb->get_results($query, OBJECT);
- return $fff;
- /****************/
- if ($fff){
- global $post;
- foreach ($fff as $post) {
- setup_postdata($fds);
- return
- $post['abc_sample.id'] . '<br />'
- . $post['abc_sample.time'] . '<br />'
- . $post['user.user_email'] . '<br />
- <input type="submit" value="Modify" id="btnModify"
- onclick="btnModify(' . $post['abc_sample.id'] . ')"/>';
- };
- };
- };
- add_shortcode( 'php_ABC' , 'sample_shortcode' );
Add Comment
Please, Sign In to add comment