Support » Plugins » Hacks » How can I test this code?

  • I have this php code that I want to test, where do I put the file? TIA:

    <?php	$sql = "select a.ID,a.post_title, as tag
    			from $wpdb->posts a, $wpdb->term_relationships b, $wpdb->terms c, $wpdb->term_taxonomy d
    			where a.ID = b.object_id
    			and b.term_taxonomy_id = c.term_id
    			and c.term_id = d.term_id
    			and d.taxonomy = '$tax'
    			and a.post_status='$stat'
    			and a.ID = $post_id";
    	$tags = $wpdb->get_results($sql);
Viewing 1 replies (of 1 total)
  • I use the PHP Execution plugin to allow me to test code directly from a page. Install the plugin, activate, create a new blank page and edit it in HTML mode.

Viewing 1 replies (of 1 total)
  • The topic ‘How can I test this code?’ is closed to new replies.