@@ -15,7 +15,7 @@ public function home()
1515
1616 //调用article表,按id倒序排列并显示6条数据
1717 $ data = $ this ->db ->from ('article ' )->order_by ('id ' , 'desc ' )->limit (8 )->get ();
18- return $ data ->result ();//单结果标准查询(对象形式)
18+ return $ data ->result ();
1919 }
2020
2121 public function article ($ id )
@@ -26,25 +26,25 @@ public function article($id)
2626
2727 public function tweets ($ config )
2828 {
29- $ query = $ this ->db ->get ('tweets ' , $ config ['per_page ' ],$ this ->uri ->segment (3 ));
30- return $ query ->result_array ();//单结果标准查询(数组形式)
29+ $ query = $ this ->db ->get ('tweets ' , $ config ['per_page ' ], $ this ->uri ->segment (3 ));
30+ return $ query ->result_array ();
3131 }
3232
3333 public function diaries ($ config )
3434 {
35- $ query = $ this ->db ->get ('diaries ' , $ config ['per_page ' ],$ this ->uri ->segment (3 ));
35+ $ query = $ this ->db ->get ('diaries ' , $ config ['per_page ' ], $ this ->uri ->segment (3 ));
3636 return $ query ->result_array ();
3737 }
3838
3939 public function learn ($ config )
4040 {
41- $ query = $ this ->db ->get ('article ' , $ config ['per_page ' ],$ this ->uri ->segment (3 ));
41+ $ query = $ this ->db ->get ('article ' , $ config ['per_page ' ], $ this ->uri ->segment (3 ));
4242 return $ query ->result_array ();
4343 }
4444
4545 public function guestbook ($ config )
4646 {
47- $ query = $ this ->db ->get ('guestbook ' , $ config ['per_page ' ],$ this ->uri ->segment (3 ));
47+ $ query = $ this ->db ->get ('guestbook ' , $ config ['per_page ' ], $ this ->uri ->segment (3 ));
4848 return $ query ->result_array ();
4949 }
5050
0 commit comments