I hope you can point me at where I'm going wrong on my first use of nuBuilder.
I have made a Fast Form pointing at one of my tables of my existing phpbb database. It works as expected

However, when I edit the Fast Form using the SQL builder and add a related phpbb table (in preparation to add some fields from a 2nd table to the form) I no longer see any records displayed in the form and I get a nuRunQuery error.
Here is my edited Fast Form SQL
Code: Select all
SELECT
phpbb_profile_fields_data.*,
phpbb_users.*
FROM
phpbb_profile_fields_data
JOIN phpbb_users ON phpbb_profile_fields_data.user_id = phpbb_users.user_id
And here is the nuRunQuery error
Code: Select all
[0] :
===USER==========
globeadmin
===PDO MESSAGE===
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'user_id' in field list is ambiguous
===SQL===========
SELECT user_id,pf_firstname,pf_lastname,pf_yearjoined,pf_paymentmethod
FROM phpbb_profile_fields_data JOIN phpbb_users ON phpbb_profile_fields_data.user_id = phpbb_users.user_id
WHERE 1 LIMIT 0, 20
===BACK TRACE====
/var/sites/s/<mySite>/public_html/nuBuild/nuform.php - line 892 (nuRunQuery)
/var/sites/s/<mySite>/public_html/nuBuild/nuform.php - line 322 (nuBrowseRows)
/var/sites/s/<mySite>/public_html/nuBuild/nuapi.php - line 40 (nuGetFormObject)
The thing that I don't understand is that the SQL in the error message is different from the SQL in the form design. The form design in the nuBuilder UI doesn't have me SELECTing the user_id. So I can't see the ambiguity.
Might there be another object (called user_id) somewhere in nuBuilder that I've previously created that I need to delete?
It's not an option for me to rename the table fields and make them unique because they are existing fields created by phpbb.
Thanks for your help, David.