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

Home » RADICORE development » Bug Reports » Problem extending sql_from
Problem extending sql_from [message #1856] Mon, 17 November 2008 09:29 Go to previous message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
I don't know if this is a bug or not..
I want to create a list1 screen that shows some summary data, then with a button I will link it to a detail screen that shows the detailed summary.
I guess the best way to do this is extending the sql manually.
So I created a class and added this code:
    function _cm_initialise ($where, $selection){
	//	if ($GLOBALS['mode'] == 'search' || $GLOBALS['mode'] == 'list') {

$this->sql_from= "(SELECT entidad.noment ,  1 as importe
		FROM participante 
		JOIN part_equipo_xref  ON participante.participante_id=part_equipo_xref.participante_id
		JOIN equipo  ON part_equipo_xref.equipo_id = equipo.equipo_id
		JOIN entidad  ON equipo.entidad_id= entidad.entidad_id
		JOIN temporada  ON temporada.temporada_id = equipo.temporada_id
		WHERE tippart='E'
		UNION aLL
		SELECT entidad.noment,  1
		FROM participante 
		JOIN equipo  ON participante.participante_id = equipo.entrenador_id
		JOIN entidad  ON equipo.entidad_id= entidad.entidad_id
		JOIN temporada  ON temporada.temporada_id = equipo.temporada_id
		WHERE tippart='N'
		UNION ALL
		SELECT entidad.noment,  1
		FROM participante 
		JOIN equipo  ON participante.participante_id = equipo.delegado_id
		JOIN entidad  ON equipo.entidad_id= entidad.entidad_id
		JOIN deporte  ON equipo.deporte_id = deporte.deporte_id
		JOIN temporada  ON temporada.temporada_id = equipo.temporada_id
		WHERE tippart='D'
		UNION ALL
		SELECT entidad.noment,  1
		FROM participante 
		JOIN equipo  ON participante.participante_id = equipo.delegado_id
		JOIN entidad  ON equipo.entidad_id= entidad.entidad_id
		JOIN temporada  ON temporada.temporada_id = equipo.temporada_id
		UNION ALL
		SELECT entidad.noment,  1
		FROM entidad) as entidad";
	   }


I'm getting this error:
Fatal Error: Uncaught exception fron DOMException, message = Invalid Character Error (# 256).

Error in line 286 of file '/Applications/MAMP/htdocs/radicore/includes/error.inc'.

Script: /radicore/ceae/entidad_importes(list1).php

User Id: MGR

Remote Address: ::1

Request URI: /radicore/ceae/entidad_importes(list1).php?session_name=menu0


With the debugger I found that what I'm putting in sql_from is too long and the last lines get truncated.
How can I solve this?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Incorrect Login Message
Next Topic: login fails after upgrade to ver 1.42
Goto Forum:
  


Current Time: Sun Apr 28 15:35:07 EDT 2024

Total time taken to generate the page: 0.01066 seconds