So in calculated fields I can put 'fecini,fecfin' so that it retrieves two fields? I thought only one filed was possible.
I've defined the relationship between team and category to retrieve fecini, so now in the team_player_xref(link1).php.sql I have:
SELECT SQL_CALC_FOUND_ROWS equipo.*, categoria.fecini
FROM equipo LEFT JOIN categoria ON (categoria.categoria_id=equipo.categoria_id)
WHERE ( equipo.equipo_id='2' ) AND equipo.entidad_id=2 LIMIT 1 OFFSET 0 =>Count=1
SELECT SQL_CALC_FOUND_ROWS equipo.equipo_id, participante.participante_id,
CONCAT_WS(' ',participante.catsalut, participante.nombre, participante.apellido1,participante.apellido2) AS part_det,
CASE WHEN part_equipo_xref.participante_id IS NULL THEN 'F' ELSE 'T' END AS selected
FROM equipo CROSS JOIN participante
LEFT JOIN part_equipo_xref ON (equipo.equipo_id=part_equipo_xref.equipo_id
AND participante.participante_id=part_equipo_xref.participante_id)
WHERE equipo.equipo_id='2' AND participante.participante_id IN (SELECT participante_id FROM part_ent_xref WHERE entidad_id=2) LIMIT 10 OFFSET 0 =>Count=1
as you can see categoria.fecini is not in the final SQL of part_equipo_xref(link1).php.sql, I included this in class team_player_xref:
function _cm_filterWhere ($array=null)
// identify field names which are NOT to be filtered out of a $where string.
{
$array[] = 'fecini';
return $array;
} // _cm_filterWhere
How can I make fecini appear in the sql? I read the docs you pointed me to but didn't find it out.
[Updated on: Thu, 17 July 2008 16:45]
Report message to a moderator