Class to manager MYSQL for Harbour/xHarbour
Custom Search

viernes, 9 de julio de 2010

Modificar valor de sentencias / Modify sentences values

Para query "simples" Dolphin separa individualmente el valos de las sentencias y poder asignarlas de manera individual (WHERE,  GROUP, HAVING, LIMIT, ORDER)
Puede dejar que dolphin construya  las sentencias "simples" por ud


For "simple" query, Dolphin individually separated intervals of sentences and to assign them individually (WHERE, GROUP, HAVING, LIMIT, ORDER)
You can let dolphin build "simple" sentences for you



      oQry = TDolphinQry():New( "select student.student_id, student.name, "+;
                                "absence.date from absence right join  student on "+;
                                "student.student_id = absence.student_id "+;
                                "where absence.date is not null group by student.student_id"+;
                                " order by absence.date limit 10", oServer )


    ? "QUERY  => " , oQry:cQuery
    ?
    ? "WHERE  => " , oQry:cWhere  
    ? "GROUP  => " , oQry:cGroup  
    ? "HAVING => ", oQry:cHaving  
    ? "ORDER  => ", oQry:cOrder  
    ? "LIMIT  => ", oQry:cLimit





    ? "Changing sentences values"
    ?
    oQry:SetLimit( 3, .F. ) //no refresh
    oQry:SetWhere( "absence.date is null" )// by default the query is refresh
    ? "Limit changed"
    ? "Where changed"
    ? "LIMIT  => ", oQry:cLimit
    ? "WHERE  => " , oQry:cWhere  
    ?
    ? "QUERY  => " , oQry:cQuery
    ?


No hay comentarios:

Publicar un comentario