Page 1 of 1

column not found

Posted: Fri Aug 06, 2021 12:11 am
by GlenMcCabe
Hi

I am getting the following debug error

[0] :
===USER==========

globeadmin

===PDO MESSAGE===

SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'field list'

===SQL===========

SELECT `` FROM zzzzsys_setup WHERE (`refID` = '1613') AND (0)

===BACK TRACE====

/home1/ccchubda/public_html/ccchublive/core/nuform.php - line 787 (nuRunQuery)

/home1/ccchubda/public_html/ccchublive/core/nuform.php - line 336 (nuGetSubformRecords)

/home1/ccchubda/public_html/ccchublive/core/nuapi.php - line 56 (nuGetFormObject)

I have a browse / edit form which has been in use for some time. The edit form had 9 tabs 6 of which where used to directly input data to the table. 3 where subforms which input data into related tables. I added a fourth subform for a new related table. the data inputted is saved in the table but does not stay visible in the tab. I have checked the form details, associated objects and the table. I cannot see any anomalies. I have edited the subform and objects to redo the values but no change.

Any suggestions?

Re: column not found

Posted: Fri Aug 06, 2021 2:53 am
by kev1n
Hi,

Why is the table zzzzsys_setup used? Could you run this query to check where it is referenced?

Code: Select all

SELECT * FROM `zzzzsys_form` WHERE `sfo_browse_sql` like '%zzzzsys_setup%';

Re: column not found

Posted: Fri Aug 06, 2021 3:58 am
by GlenMcCabe
Kevin

I ran the query and got zero rows. I extracted sfo_browse_sql for each row and manually checked them. Found no reference to zzzzsetup. I did however see that the browse for the new subform was selecting from the wrong table. I edited this and the new subform is now saving and holding the data correctly.

The nudebug error is still coming up each time i enter the form.

The refid in the error is the correct id for the row selected from the browse list.

The sql for the referral form is

SELECT referral.*
patients.*
referral_reasons.reasonforreferral
FROM patients
LEFT JOIN referral ON patients.patid = referral.patientid
LEFT JOIN referral_reasons on referral.referralreasonsID = referral_reasons.id
WHERE referral.patientid = #record_id#

This did not give any debug errors before the new subform was added.

Re: column not found

Posted: Fri Aug 06, 2021 8:54 am
by kev1n
Is the error still

Code: Select all

SELECT `` FROM zzzzsys_setup WHERE (`refID` = '1613') AND (0)
?

Re: column not found

Posted: Fri Aug 06, 2021 10:28 am
by GlenMcCabe
Kevin

That is still the format of the error. As I said the actual refid changes to reflect the referral chosen from the browse list.

As an aside. Is the Nudebug list a central list or is there one per user. If it is per user can I look at these to see exactly when it started to happen?

Glen