Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Condition in $where string is being lost
Condition in $where string is being lost [message #1643] Fri, 12 September 2008 13:40 Go to next message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
I'm trying this approach with a league and assigning teams to it. I'm changing the where clause in the child subclass so that it displays teams with grucomp_id=NULL, the code is the following:
    // ****************************************************************************
    function _cm_pre_getData ($where, $where_array, $fieldarray=null)

    {
       
$where = "equipo.grucomp_id IS NULL AND grucomp.liga_id in 
(SELECT liga.liga_id FROM liga WHERE liga.deporte_id=equipo.deporte_id AND liga.categoria_id = 
equipo.categoria_id AND liga.temporada_id = equipo.temporada_id)";

        return $where;

    } // _cm_pre_getData


By debugging the sql file I see that the where clause is
equipo.grucomp_id IS NULL
and that all the other conditions in the clause are erased.
Any tips to where the where clause removes the last part of the conditions I add?
Re: Condition in $where string is being lost [message #1644 is a reply to message #1643] Fri, 12 September 2008 13:54 Go to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
If you stepped through with your debugger you would see that the second condition is being lost inside the _sqlAssembleWhere() method during the processing of the filterWhere() function. Try moving that condition to $this->sql_where instead as this is not affected by that function.

Previous Topic: Exporting data from radicore into an excel file
Next Topic: Help text task_id
Goto Forum:
  


Current Time: Thu Apr 18 23:02:22 EDT 2024

Total time taken to generate the page: 0.01178 seconds