1,sysdate
oracle中表示今天的日期函数不是now(),而是sysdate
可在command window中,输入select sysdate from dual;产看当天的日期和时间
2,paginate_by_sql分页方法
传统的方法为:
@obj_pages,@objs = paginate_by_sql :talbe_name,:conditions=>[conditions],:per_page=>page_num
视图中:<%=paginator(@obj_pages)%>
paginate_by_sql方法:
@objs = Ojb.paginate_by_sql("select * from table_name where conditions")
视图中的分页方法:
<%= will_paginate @arch_lib_firms,:prev_label=>'上一页',:next_label=>'下一页' %>
oracle中表示今天的日期函数不是now(),而是sysdate
可在command window中,输入select sysdate from dual;产看当天的日期和时间
2,paginate_by_sql分页方法
传统的方法为:
@obj_pages,@objs = paginate_by_sql :talbe_name,:conditions=>[conditions],:per_page=>page_num
视图中:<%=paginator(@obj_pages)%>
paginate_by_sql方法:
@objs = Ojb.paginate_by_sql("select * from table_name where conditions")
视图中的分页方法:
<%= will_paginate @arch_lib_firms,:prev_label=>'上一页',:next_label=>'下一页' %>