Page 1 of 1

nuDebug() secret output?

Posted: Wed Jan 02, 2013 5:16 pm
by clinterman
I have a form which holds a table called store_review. It has 2 fields
- ID autoincrement
- STORE_ID implemented as a lookup to another table (STORE)

I left ID-field of the form because it will be pre-populated with dbGetUniqueID, which is not numeric. So my current form only holds the lookupfield. When I insert a new record and press save, the record doesn't get saved. Maybe because store_id doesn't hold a value or isn't marked as "dirty" / changed.

So I went to the Before and After save sections of the form properties and put in:
nuDebug("Before saving".$_POST['store_id']);

nuDebug("After saving".$_POST['store_id']);

Then moved to PHP Debug button but that form doesn't show zzsys_trap records that are of type $trap_sql. The nuDebug did write something to zzsys_trap based on the datetimestamp. But what did it write? Its a secret! How to decode the contents of zzsys_trap $trap_sql records?

Re: nuDebug() secret output?

Posted: Wed Jan 02, 2013 10:42 pm
by admin
clinterman,

Records starting with $TRAP_sql are system generated and used by the Print Button to reproduce a html table that can be exported.

If you go to the Debug Button on the setup tabs, you should see the results you are looking for with $TRAP_sql records filtered out.

Steven

Re: nuDebug() secret output?

Posted: Mon May 08, 2017 9:26 pm
by Fike
I've just found out why sometimes I was not able to print the HTML table when using the Print Button at some Browse forms.

The $TRAP_sql records generated when using the print button pick the 'Before browse' code of the form

When the user presses the Print Button, the browseprint.php file gets this code and executes it IN A SINGLE LINE using the eval() function in order to build the table of that form.

However when the 'Before browse' php code contains double-slash comments (//) the eval() function breaks after the first comment becuase the code was retrieved IN A SINGLE LINE.

Therefore I just needed to remove the double-slash comments at the 'Before browse' tab, in order to make the Print Button work correctly.

Hope this helps someone still using nuBuilder v2.

Kind regrads,

Fike