0
對於在WordPress 3.3.1自定義查詢獲取記錄我使用WP:使用自定義查詢對象技術
$s = $_GET['s'];
$myrows = $wpdb->get_results("SELECT post_title FROM $wpdb->posts WHERE post_content LIKE '%".$s."%' GROUP BY post_title");
,並返回對象數組
Array ([0] => stdClass Object ([post_title] => Charles Murray does it again) [1] => stdClass Object ([post_title] => The education crisis myth))
,但我怎麼能取POST_TITLE .. ?
嘗試打印$ myrows [0] [0] – alfasin 2012-02-04 21:22:45