simple resulting sql works in dbase... but not in DTables

simple resulting sql works in dbase... but not in DTables

perikutperikut Posts: 4Questions: 0Answers: 0
edited August 2011 in General
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

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    and the value in the database is not null for that row? you'll have to post more info, perhaps a link, image, or some sample data from your tables.
  • perikutperikut Posts: 4Questions: 0Answers: 0
    thanks for the answer,

    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
This discussion has been closed.