Guest User

Untitled

a guest
Jul 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. function sample_shortcode ($post) {
  2.  
  3. global $wpdb;
  4.  
  5. $query = "SELECT *
  6. FROM abc_sample
  7. LEFT JOIN (users)
  8. ON (abc_sample.user_email=users.user_email)";
  9.  
  10. $fff = $wpdb->get_results($query, OBJECT);
  11. return $fff;
  12.  
  13. /****************/
  14.  
  15. if ($fff){
  16. global $post;
  17. foreach ($fff as $post) {
  18. setup_postdata($fds);
  19.  
  20. return
  21. $post['abc_sample.id'] . '<br />'
  22. . $post['abc_sample.time'] . '<br />'
  23. . $post['user.user_email'] . '<br />
  24. <input type="submit" value="Modify" id="btnModify"
  25. onclick="btnModify(' . $post['abc_sample.id'] . ')"/>';
  26. };
  27. };
  28. };
  29. add_shortcode( 'php_ABC' , 'sample_shortcode' );
Add Comment
Please, Sign In to add comment