close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Error on update page

Thread began 4/20/2017 10:51 am by iain331081 | Last modified 4/21/2017 11:57 am by Ray Borduin | 354 views | 6 replies |

iain331081

Error on update page

Not sure what's up with this one, but getting an error 'Unknown column 'UserID' in 'where clause' when I try to save the update.

Probably something really obvious, but I haven't spotted it.

Have attached a copy of the page below.

Thanks for having a look.

Sign in to reply to this post

Ray BorduinWebAssist

Line 132 you have:
$WA_indexField = "UserID";

That must not be valid column name for the agents table.

Sign in to reply to this post

iain331081

Thanks Ray - the page pulls through data from the agents and trade_users tables. Basically agents are the parent companies and trade_users are the contacts at the companies.

And this form is just updating the agent details. So sounds like I need to either change the query or add a second one for the update.

It threw me as it was fine for the page before doing the update.

Sign in to reply to this post

Ray BorduinWebAssist

That should be updated to the column name in the agents table that has the user id field value in it... or if that isn't unique it should be set to the unique field in the agents table and then the hidden form element WADAUpdateRecordID should be set to the correct associated value.

Sign in to reply to this post

iain331081

Sorry Ray - think I posted the wrong version of the page I was looking at.

I have attached a revised version now - same link and login as before.

So it should be referencing the UserID of the tree_users table with the fields it should update.

This is giving me the error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `UserID`='7857'' at line 1

Not sure why, as its fine when the page loads before submitting the form?

Sign in to reply to this post

Ray BorduinWebAssist

You had added a column to the update "LastUpdatedBy" but that column didn't have a value in the values list nor did it exist in the database. I've removed it from line 134 and that appears to have fixed the problem.

Sign in to reply to this post

iain331081

Thanks Ray - sorry I missed that.

Sign in to reply to this post

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...