- 8
-
joyful
- 조회 수 220
검색기능을 구현하려해요
DB가
aid bid cid img 정보
__________________
SSL SSL SSL SSL SSL
라 되있으면
찾고 싶은 정보가 SSL이라면 정보 칼럼(?)서 SSL와 연관되는걸 검색해 페이지에 5개만 출력, 출력하는건 정보를 재외한 aid,bid,cid,img만 출력하게 했으면 좋겠어요
요약하면
DB가 저렇게 되있으면
SSL을 DB 정보 칼럼(?)에 검색해 연관되는걸 5개 제한 aid,bid,cid만 출력하게 했으면 좋겠습니다
댓글 8
![title : 황금 서버 (30일) title: 황금 서버 (30일)](https://studyforus.com/./files/iconshop/33055af84f02ddedb19db038cdae0d2f.gif)
![profile image](/files/member_extra_info/profile_image/569/001/1569.png?t=1527385219)
![comment menu](/modules/board/skins/comely_board/images/icn_more.png)
2018.08.02. 18:56
![title : 에그 title: 에그](https://studyforus.com/./files/iconshop/738f0295450a95a257cce1f403834520.gif)
![profile image](/files/member_extra_info/profile_image/136/324/324136.jpg?t=1535776672)
죄송한데 html로 출력하는건 어떻게 하나요?
검색해서 페이지로 출력하는 모든 코드를 부탁드립니다
![comment menu](/modules/board/skins/comely_board/images/icn_more.png)
2018.08.03. 11:53
![title : 황금 서버 (30일) title: 황금 서버 (30일)](https://studyforus.com/./files/iconshop/33055af84f02ddedb19db038cdae0d2f.gif)
![profile image](/files/member_extra_info/profile_image/569/001/1569.png?t=1527385219)
프레임워크 없이 순 php로만 작성하고 계신 건가요?
![comment menu](/modules/board/skins/comely_board/images/icn_more.png)
2018.08.03. 19:47
![title : 에그 title: 에그](https://studyforus.com/./files/iconshop/738f0295450a95a257cce1f403834520.gif)
![profile image](/files/member_extra_info/profile_image/136/324/324136.jpg?t=1535776672)
코드이그나이터로 만들려고 하고 있어요
![comment menu](/modules/board/skins/comely_board/images/icn_more.png)
2018.08.04. 10:58
![title : 황금 서버 (30일) title: 황금 서버 (30일)](https://studyforus.com/./files/iconshop/33055af84f02ddedb19db038cdae0d2f.gif)
![profile image](/files/member_extra_info/profile_image/569/001/1569.png?t=1527385219)
$query = $this->db->query("SELECT aid, bid, cid, img FROM {테이블 이름} WHERE 정보 LIKE \"%SSL%\" LIMIT 5");
foreach ($query->result_array() as $row)
{
echo $row['aid'] . ' '. $row['bid'] . ' ' . $row['cid'] . ' ' . $row['img'] . '\n';
}
![comment menu](/modules/board/skins/comely_board/images/icn_more.png)
2018.08.05. 12:48
![title : 에그 title: 에그](https://studyforus.com/./files/iconshop/738f0295450a95a257cce1f403834520.gif)
![profile image](/files/member_extra_info/profile_image/136/324/324136.jpg?t=1535776672)
정말 감사합니다!!
![comment menu](/modules/board/skins/comely_board/images/icn_more.png)
2018.08.05. 13:15
![title : 황금 서버 (30일) title: 황금 서버 (30일)](https://studyforus.com/./files/iconshop/33055af84f02ddedb19db038cdae0d2f.gif)
![profile image](/files/member_extra_info/profile_image/569/001/1569.png?t=1527385219)
네 열심히 제작하세요~!
![comment menu](/modules/board/skins/comely_board/images/icn_more.png)
2018.08.05. 13:52
![title : 에그 title: 에그](https://studyforus.com/./files/iconshop/738f0295450a95a257cce1f403834520.gif)
![profile image](/files/member_extra_info/profile_image/136/324/324136.jpg?t=1535776672)
네!
![comment menu](/modules/board/skins/comely_board/images/icn_more.png)
2018.08.05. 16:17
권한이 없습니다.
SELECT aid, bid, cid, img FROM {테이블 이름} WHERE 정보 LIKE "%SSL%" LIMIT 5;
다만 인덱스를 타지 않기 때문에 속도는 보장하지 못합니다.