$id = Model_Ids::query()->select("id")->where("mail","=",$get["id"])->get_one(); var_dump($id);
とすると
object(Model_CompanyMail)#99 (10) { ["_is_new":protected]=> bool(false) ["_frozen":protected]=> bool(false) ["_data":protected]=> array(1) { ["id"]=> string(2) "74" } ["_custom_data":protected]=> array(0) { } ["_original":protected]=> array(1) { ["id"]=> string(2) "74" } ["_data_relations":protected]=> array(0) { } ["_original_relations":protected]=> array(0) { } ["_reset_relations":protected]=> array(0) { } ["_view":protected]=> NULL ["_iterable":protected]=> array(0) { } }
という返り値が表示されていて
$id_no に["id"]=> string(2) "74" というデータを使いたい時
$id_no = $id[] //$id_no = 74
なんとしたら$idで取得したstring(2) "74"を使用することができますでしょうか?
データは必ず1件のみの取得になりますので
foreachとうのループを使わずデータを使用する方法を知りたいです
「おrm」となっていますよ >タイトル