【wordpress】 $wpdb 应用实例

<?php

require_once('e:/php/wordpress/wp-blog-header.php');//注释掉这一句就出错了

global $wpdb;





$a = $wpdb->get_results("SELECT id, keyword FROM wp_keyword where id<10");

//echo count($a);

foreach ($a as $b) {

echo $b->keyword."<br />";

}

?>

  

你可能感兴趣的:(wordpress)