mysql_fetch_object에 대해서...
본문
while ($row=mysql_fetch_object($result)) { <br>
if($brandcode==$row->brandcode) break; <br>
} <br>
요부분에 설명좀 해주시겠어염.... <br>
제발,,,,mysql_fetch_object함수를 모르겠네요
if($brandcode==$row->brandcode) break; <br>
} <br>
요부분에 설명좀 해주시겠어염.... <br>
제발,,,,mysql_fetch_object함수를 모르겠네요
답변 2
음....
만약 table 이 아래 와 같다면......
id varchar(20);
name varchar(20);
여기서 쿼리문을...
$result = mysql_query("select * from table");
$row = mysql_fetch_object($result);
라고 하면.....
echo("$row->id"); //--> 테이블의 id 필드의 레코드 값을 가져옴,
echo("$row->name"); // -->테이블의 name 필드의 레코드 값을 가져옴,
음.. 그러니까....
필드명과 결과 값을 연관 배열로 담는다?!!!
머 이렇게 생각하시면 되겠네요....
님의 쏘스를 보면 $brandcode 의 입력받는 값과
table의 brandcode 필드의 레코더 값을 같은것을 찾는
것 같네요....그럼.
만약 table 이 아래 와 같다면......
id varchar(20);
name varchar(20);
여기서 쿼리문을...
$result = mysql_query("select * from table");
$row = mysql_fetch_object($result);
라고 하면.....
echo("$row->id"); //--> 테이블의 id 필드의 레코드 값을 가져옴,
echo("$row->name"); // -->테이블의 name 필드의 레코드 값을 가져옴,
음.. 그러니까....
필드명과 결과 값을 연관 배열로 담는다?!!!
머 이렇게 생각하시면 되겠네요....
님의 쏘스를 보면 $brandcode 의 입력받는 값과
table의 brandcode 필드의 레코더 값을 같은것을 찾는
것 같네요....그럼.
감사합니다
답변을 작성하시기 전에 로그인 해주세요.