1
나는 igniter data mapper를 처음 사용했다. 사용자라는 테이블이 있는데 데이터베이스 테이블에서 데이터를 검색하여 사용자에게 표시하려고합니다.DataMapper Code Igniter에서 get_by_user_id()가 반환 한 데이터를 표시하는 방법은 무엇입니까?
$u=new User();
$results=$u->get_by_user_id($id);
//$results here will be set to huge bunch of none sense data(which also includes the row that I am looking for as well)
if ($u->exists())
{
foreach ($results->all as $row){
$data['user']['first_name']=($row->user_first); //this where I am stuck ..
$data['user']['last_name']=($row->user_last);//this is also where I am stuck..
}
내가 찾고 있어요 필요한 필드를 얻을 결과를 처리하는 방법을 알고 내가 볼 수있는 사용자에게 전달하고있는 $ 데이터에 저장하지 않습니다 여기에 내가 모델이 무엇인가 . 감사합니다.
감사합니다. @Armon Toubman 덕분입니다. –