테스트 사이트 - 개발 중인 베타 버전입니다

run() 함수를 통해서 호출하때 order by 하려합니다~~~~ 채택완료

제임스준 8년 전 조회 4,957

안녕하세여

/lib/shop.lib.php 파일에서 정의 되있는 run() 함수를 통해서 쿼리를 호출하는 페이지 입니다.

기본적으로 상품 페이지 들이 이 함수로 호출해 오는데요....

---------------------------------------------------------- $list->set_order_by($order_by); $list->set_from_record($from_record); $list->set_view('it_img', true); $list->set_view('it_id', false); $list->set_view('it_name', true); $list->set_view('it_cust_price', true); $list->set_view('it_price', true); $list->set_view('it_icon', true); $list->set_view('sns', false); echo $list->run(); ----------------------------------------------------------

특정 페이지에서 (it_price * 2) - it_cust_price 의 값으로 order by 하려고 합니다.

제 짧은 생각에 이렇게 하면 될까 했는데, 안되네여 -_-

---------------------------------------------------------- $list->set_order_by(aaaaa); $list->set_view('(it_price * 2) - it_cust_price as aaaaa', true); ----------------------------------------------------------

run() 함수를 사용해서 이렇게 호출할수 있는 방법 없을까여??

도와주세여........ 짧은 한마디라고 댓글 부탁드립니다~~~~~~~~~~

도와주세여~~ 

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
8년 전

$order_by = " (it_price * 2) - it_cust_price"; <---이걸 맨 위에 넣어보세요

 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

제임스준
8년 전
균이님~~~ 답변 감사합니다.....

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인