Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rob Watkins 370 posts 702 karma points
    Feb 24, 2011 @ 18:51
    Rob Watkins
    0

    Escaping column names

    I am creating a very simple user control to enable me to add new sections without faffing with the database directly; it's all working fine, but one question:

    I am using this SQL:

    insert into umbracoUser2App  ([user], app) values (@user, @app)

    ...with the ISqlHelper to create the entry in the user table; I need the square brackets or the server complains as "user" is a reserved word.

    Now, I'm a SQL Server man so don't really know MySql in depth and don't have a handy install to test, but will this work in MySql? Will the helper take care of the brackets? Or should I be doing something else?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies