simple resulting sql works in dbase... but not in DTables
simple resulting sql works in dbase... but not in DTables
hello,
I wonder why should the resulting SQL work if I copy&paste&execute this to pgAdmin but it fetches a NULL value only for this second column (check below: institutiongroup.institutionid). The other columns data are correctly fetched.
thanks in advance,
$aColumns = array( 'personid','institutiongroup.institutionid'...)
example of SQL:
SELECT DISTINCT personid, institutiongroup.institutionid, metadatacollectionid
FROM metadatacollection NATURAL JOIN descriptivegroup NATURAL JOIN persongroup
NATURAL JOIN person JOIN institutiongroup ON institutiongroup.institutionid = metadatacollection.institutionid
I wonder why should the resulting SQL work if I copy&paste&execute this to pgAdmin but it fetches a NULL value only for this second column (check below: institutiongroup.institutionid). The other columns data are correctly fetched.
thanks in advance,
$aColumns = array( 'personid','institutiongroup.institutionid'...)
example of SQL:
SELECT DISTINCT personid, institutiongroup.institutionid, metadatacollectionid
FROM metadatacollection NATURAL JOIN descriptivegroup NATURAL JOIN persongroup
NATURAL JOIN person JOIN institutiongroup ON institutiongroup.institutionid = metadatacollection.institutionid
This discussion has been closed.
Replies
it is not casual that the NULL values are only happening in 'institutiongroup.institutionid' (that is, a Table_name.Column_name column);
in fact, I did a var_dump($aRow) and i see that data for this column is dumped as 'institutionid'
(array(8) {
["personid"]=>
string(1) "2"
["institutionid"]=>
string(1) "3"
)
I don't think this is a DataTables bug, it's how SQL dumps out the info.
just changing some code...
for ( $i=0 ; $i