Page 1 of 1

SQL for Reports error.

Posted: Thu Oct 28, 2021 6:27 pm
by Mr71
When I prepare the query for a report and build the relationship between certain tables, the report is blank. The same query is fully functional in the SQL of the phpadmin... what's the problem!?
What can I try to verify!?

This is the query
SELECT
lpcdbox.tit_lpcdbox, (Album Title)
lpcdbox.anno_p_lpcdbox, (Year)
artista.des_artista (Band from band table)

FROM
lpcdbox (album table)
JOIN artista ON artista.artista_id = lpcdbox.art_lpcdbox (relationship between band table and album table)


This is the Debug Message
[0] :
===USER==========
globeadmin
===PDO MESSAGE===
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'Sql1529862_3.___nu1617ac32779c8a___' doesn't exist
===SQL===========
SELECT * FROM (SELECT * FROM ___nu1617ac32779c8a___ ORDER BY art_lpcdbox asc ,des_artista asc ) AS tmp
===BACK TRACE====
/web/htdocs/........../core/nurunpdf.php - line 249 (nuRunQuery)
/web/htdocs/........../core/nurunpdf.php - line 68 (nuBuildReport)
/web/htdocs/........../core/nurunpdf.php - line 23 (nuRunReportId)


I can't understand why it works on phpadmin and I also think in nuBuilder forms, but not in reports....
thanks

Re: SQL for Reports error.

Posted: Sat Oct 30, 2021 9:20 am
by Mr71
I solved it by checking the fields affected by the relationships and setting "null" on some records that should have it as default value but did not have it, I reduced as much as possible some fields that I had set to "longtext".
It seems that everything is working now!