close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

DataAssist Pages wizard does not write the correct query code, "ambiguous error".

Thread began 11/07/2018 6:57 pm by Jonas | Last modified 11/11/2018 12:11 pm by Jonas | 17 views | 1 replies

Jonas

DataAssist Pages wizard does not write the correct query code, "ambiguous error".

It appears that the DataAssist Pages wizard does not write the correct query code. Firstly, it is not written consistently. Sometimes with `` sometimes without. Secondly, it sometimes misses the table name before the column name, which becomes an "amigous" error message.

When I let Querybuilder fix the problem, orders will not be the way I want it. It appears that query builder is based on the order in the database itself. But I have changed this in the DA Pages wizard.

So I have to correct the code, which is a little frustrating to do every time I create new CRUD files using DA.

Below is the code from both Detail page and Results page. Both the wrong code that DA creates and the code that I corrected.

I hope you can add this to your "to-do list" to the next update.

Detail page, DA code with error from browser:

"SELECT id, `llSubject`.`menu_name` AS llSubject_menu_name, llCountry.country AS llCountry_country, `llCategory`.`content` AS llCategory_content, content, landmarkFeature, link1, link2, date, date_update, user_id FROM llPage LEFT JOIN llSubject ON llSubject.id = llPage.subject_id LEFT JOIN llCountry ON llCountry.code = llPage.countryCode LEFT JOIN llCategory ON llCategory.id = llPage.category_id WHERE id = ?

Column 'id' in field list is ambiguous"
--
Detail page, my correct code:

"SELECT `llPage`.`id`, `llSubject`.`menu_name` AS llSubject_menu_name, `llCountry`.`country` AS llCountry_country, `llCategory`.`content` AS llCategory_content, `llPage`.`content`, `llPage`.`landmarkFeature`, `llPage`.`link1`, `llPage`.`link2`, `llPage`.`date`, `llPage`.`date_update`, `llPage`.`user_id` FROM llPage LEFT JOIN llSubject ON llSubject.id = llPage.subject_id LEFT JOIN llCountry ON llCountry.code = llPage.countryCode LEFT JOIN llCategory ON llCategory.id = llPage.category_id WHERE `llPage`.`id` = ?"

-----

Results page, DA code with error from browser:

SELECT id, link2, `llSubject`.`menu_name` AS llSubject_menu_name, llCountry.country AS llCountry_country, `llCategory`.`content` AS llCategory_content, content, date_update FROM llPage LEFT JOIN llSubject ON llSubject.id = llPage.subject_id LEFT JOIN llCountry ON llCountry.code = llPage.countryCode LEFT JOIN llCategory ON llCategory.id = llPage.category_id
--
Results page, my correct code:

SELECT `llPage`.`id`, `llPage`.`link2`, `llSubject`.`menu_name` AS llSubject_menu_name, `llCountry`.`country` AS llCountry_country, `llCategory`.`content` AS llCategory_content, `llPage`.`content`, `llPage`.`date_update` FROM llPage LEFT JOIN llSubject ON llSubject.id = llPage.subject_id LEFT JOIN llCountry ON llCountry.code = llPage.countryCode LEFT JOIN llCategory ON llCategory.id = llPage.category_id

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...