你好,我在$anyOne
使這個查詢WordPress插件如何在數組中選擇此項?
$anyOne = $wpdb->get_results("SELECT MAX(id) as idlastest FROM " . $table_name_for_select . " WHERE drJlDate='".$dkdrbooking_for_compare."'");
值
Array ([0] => stdClass Object ([idlastest] => 32))
我需要得到32在另一個查詢中使用它,但我不能選擇。我如何從這個數組中獲得idlastest
? 我嘗試這樣的代碼,但沒有奏效
echo 'lastestID is : '.$myIds[0]['idlastest'];
嘗試$ myIds [0] - > idlastest – sozkul
http://stackoverflow.com/questions/5156841/stdclass-對象和數組如何使用PHP在這裏,我希望它有幫助。 – Danielius
@Danielius tnx so much –