list.php에서 sql 수정
본문
shop/list.php 에서
SQL 문을 수정할려고 그러는데 아무리 수정해도 원하는 효과가 나오질 않네요 ...
/shop/list.php 에서
80번째 줄 정도에
if($ca_id){
$query = "select *, IF(FIND_IN_SET(1,it_icon)>0,1,'') AS real_icon, IF(FIND_IN_SET(2,it_icon)>0,1,'') AS country_icon from g5_shop_item where (ca_id='$ca_id' or ca_id2='$ca_id' or ca_id3='$ca_id') and it_best in('1','2','3','4','5') order by it_best";
$result=sql_query($query);
if(sql_num_rows($result)>0){
$item_data=null;
for($i=1;$row=sql_fetch_array($result);$i++){
$item_data[$i]=$row;
}
이런 부분이 있는데
$query = "select *, IF(FIND_IN_SET(1,it_icon)>0,1,'') AS real_icon, IF(FIND_IN_SET(2,it_icon)>0,1,'') AS country_icon from g5_shop_item where (ca_id='$ca_id' or ca_id2='$ca_id' or ca_id3='$ca_id') and it_best in('1','2','3','4','5') order by it_best";
여기서 조건을 더 추가하고 싶어요 데이터베이스에도 이미 컬럼을 추가해 놓은 상태 입니다.
$query = "select *, IF(FIND_IN_SET(1,it_icon)>0,1,'') AS real_icon, IF(FIND_IN_SET(2,it_icon)>0,1,'') AS country_icon from g5_shop_item where (ca_id='$ca_id' or ca_id2='$ca_id' or ca_id3='$ca_id') and it_best in('1','2','3','4','5') and test = 'y' order by it_best";
and test = 'y' 를 추가 하였는데도 원하는 효과가 않나오네요.
상품출력 쿼리가 이부 분이 아닌것 같은데 어느쪽을 수정하면되죠?
127.0.0.1/shop/list.php?ca_id=w010
방문 주소는 이주소 입니다(로컬에서 테스트 중).
답변 3
로컬 주소를 올려놓으시면 접속이 안됩니다.
PC를 켜두신 상태에서 외부 IP 주소를 알려주셔야 접속이 가능합니다..
로컬 주소현제 외부 접속 꺼놓은 상태 입니다.
제가 묻고자하는것은 list.php 에 해당하는 쿼리를 어디서 수정하는지 입니다.
보니깐 영카트 기본 소스가 아닌 외부 소스드라구요 ㅋㅋ
제가 지금 외주 받아서 하는거라 ㅋㅋㅋ 답변 감사합니다.