상품에 순서를 줬을때 다음상품과 이전상품이 이상합니다.
본문
http://sir.co.kr/qa/?wr_id=36856
위 링크의 글과 같은 증상인데요...
위 글에 남겨주신 답변을 제가 해결 할 능력이 안됩니다.
"next_href 나 pre_href에 가져오는 쿼리를 조절하시면 될듯한데요?"
쿼리를 조절한다는게 무엇인지;; 다른 조금 더 알기쉬운 방법은 없을까요?
답변 1
/shop/item.php 파일 이전상품보기, 다음상품보기 부분 있습니다.
// 이전 상품보기
$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id > '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id asc limit 1 ";
위에서 order by it_id asc 를 order by it_order asc 로 변경
// 다음 상품보기
$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id < '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id desc limit 1 ";
위에서 order by it_id desc 를 order by it_order desc 로 변경해보세요.
답변을 작성하시기 전에 로그인 해주세요.