Dear All.

I am trying of doing a query for get some records from a database and show 
results on a Data Tables (Jquery), i am new in Web development (Ajax and 
Jquery, Json, etc.) and i want know how doing.

The idea is get all records that fecha >= to var "desde" and show in a Data 
Tables

Controller:

def llamados():

        import time

        hoy=time.time()
        desde=time.strftime('%Y-%m-%d 00:00:00',time.localtime(hoy))

form=FORM(TABLE(TR("Desde ( Año-mes-día 
):",INPUT(_type="datetime",_name="desde",_value=desde,_class='datetime',_id="datetlimite",
 requires=IS_DATETIME())),
                TR("",INPUT(_type="submit",_value="Consultar"))))


        if form.accepts(request.vars,session):

             
rows=db.db(db.llamados.id_clientes==session.cliente_id).select(db.llamados.fecha>=form.vars.desde)



return dict(form=form,rows=rows,vars=form.vars)


Views:

View: llamados.html

{{extend 'layout.html'}}

<h2>Registro de Llamados</h2>

{{=form}}

.......here Data Tables!!!!!

How i can show the Datatables below to the form or if need show the Data Tables 
on another views?.

Anyone could me explain how i can doing.

Fernando.








      

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to