close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQL Error#: 1054 Unknown column 'colname3' in 'on clause'

Thread began 10/01/2015 8:33 am by Daryl | Last modified 10/01/2015 3:24 pm by Ray Borduin | 1257 views | 4 replies |

DarylBeta Tester

MySQL Error#: 1054 Unknown column 'colname3' in 'on clause'

I am trying to use the following query thats filtered from a URL Variable

SELECT children.childrenEmailAddress
FROM children JOIN activities ON activities.activitySection = children.childrenSection AND activityID = colname3
LEFT JOIN signupActivity ON signupActivity.signupActivitychildID = children.childrenID
WHERE signupActivity.signupActivitychildID IS NULL

However I get an error about using colname3 within an ON statement

MySQL Error#: 1054
Unknown column 'colname3' in 'on clause'

Do you know how I can resolve this please?

Sign in to reply to this post

Ray BorduinWebAssist

Did you define colname3 as a parameter? It looks like it didn't get defined properly in the Recordset to come from the url variable.

Sign in to reply to this post
Did this help? Tips are appreciated...

DarylBeta Tester

Hi Ray

Dreamweaver added the code for me and it seemed as I would expect.

For now I have worked around by replacing colname3 with '".$_GET["activity"]."'

Sign in to reply to this post

Ray BorduinWebAssist

That will leave a SQL injection hole in your code and make it hackable. You should add that as a URL parameter in your recordset.

Sign in to reply to this post
Did this help? Tips are appreciated...

DarylBeta Tester

All sorted now.

I rebuilt the page from scratch and it worked ok this time.

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