Get KoolPHP UI with 30% OFF!

Error Filtering a functionReturned column displays no rows.

Abraham
ok let me explain. functionReturned column means its a colum from a view where i use a function to set the column data.. like:
select myFunction(ids) as objetivos from tbl_riesgos;
soo the column im trying to filter is objetivos so i have in my grid this:
	$column = new GridColumn();
	$column->DataField = "objetivos";
	$column->HeaderText = "Objetivo";
	$grid->MasterTable->AddColumn($column);

on koolgrid.php line 321
i got the variable $_select_command having the value:
SELECT * FROM (select * from qry_riesgos where id_proyecto = 33) AS _TMP WHERE objetivos LIKE '%Tiempo%' ORDER BY clave ASC LIMIT 0 , 9999999
wich is a good formed select command, i have tested it on phpmyadmin and it returns exactly the rows wich cointains Tiempo on the field objetivos.
but my grid displays no rows.
also the next line on koolgrid.php is:
$_result = mysql_query($_select_command, $this->_Link);

and $result is giving me a False; just like if the select comand returns no rows.
if the field is a common varchar(255) data filter works perfect.. why does it wont work with functionreturned fields ??
Posted Nov 29, 2016 , edited Nov 29, 2016 Kool
Abraham
doing some test i found..
Executing the command:
SELECT * FROM (select * from qry_riesgos where id_proyecto = 33) AS _TMP WHERE objetivos LIKE '%Tiempo%' ORDER BY clave ASC LIMIT 0 , 9999999

on phpmyadmin works.
but from php executing the command:
$result = mysql_query("SELECT * FROM (select * from qry_riesgos where id_proyecto = 33) AS _TMP WHERE objetivos LIKE '%Tiempo%' ORDER BY clave ASC LIMIT 0 , 9999999");

returns a warning:
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given
even doing it like this:
$result = mysql_query("SELECT * FROM qry_riesgos WHERE objetivos LIKE '%Tiempo%' ORDER BY clave ASC LIMIT 0 , 9999999");

returns the same warning.
soo its not a koolGrid error is a mysql_query error... any one knows what could be causing the problem ??
Posted Nov 29, 2016 , edited Nov 29, 2016 Kool
David
Hi Abraham,
Would you please tell us exactly the structure of "qry_riesgos"? Thanks!
Posted Nov 30, 2016 Kool