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

Home » RADICORE development » Bug Reports » Where is where
Where is where [message #2229] Sat, 18 July 2009 04:22 Go to previous message
edortizq is currently offline  edortizq
Messages: 82
Registered: August 2008
Location: Ecuador
Member

I've created a new class (with no phisycal file on db), this class have a select from 4 tables (files .class and .dict attached); when I instance the class the fields in where clause requires must be qualificated, if not, it gives an error on the SQL sentence execution; when the fields are qualificated the where clause of the query dissapears.
That's the query
$object =& singleton::getInstance('evento_informe_resumen_q1');
$_idevento = $fieldarray['idevento'];
$object->sql_orderby = 'descripcionlocalidad';
$object->sql_where .= 'ti.idevento= '.$_idevento.' and tm.idtipomovimiento = 1';
$outarray = $object->getData();

And the sql log records this:
SELECT SQL_CALC_FOUND_ROWS lo.idlocalidad, lo.descripcionlocalidad, ti.idevento, lt.idtipomovimiento, tm.descripciontipomovimiento, count(*) as ingresos FROM localidad lo left join tarifa ta on lo.idlocalidad = ta.idlocalidad left join ticket ti on ta.idtarifa = ti.idtarifa left join logticket lt on ti.idticket = lt.idticket right join tipomovimiento tm on lt.idtipomovimiento = tm.idtipomovimiento GROUP BY lo.idlocalidad, lt.idtipomovimiento ORDER BY descripcionlocalidad

As you see there in no where clause. Please you help
 
Read Message
Read Message
Read Message
Previous Topic: SQL Syntax error
Next Topic: isnull clause being filtered out of $where with scriptNext()
Goto Forum:
  


Current Time: Mon Apr 29 08:52:53 EDT 2024

Total time taken to generate the page: 0.01041 seconds