Results 1 to 3 of 3

Thread: Adding backquotes to SQL statements

  1. #1
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Adding backquotes to SQL statements

    I had to modify the catalog extension files in order for some update queries to work. I'm not entirely certain where the problem lies, but I had to enclose all tablenames and fields in backquotes (`a_tablename`) in order for certain SQL errors to disappear.

    This came up when I tried to edit a fields maxValue after the field had been created. So I changed all UPDATE statements I could find in Catalop.php, CatalogComment.php, tl_catalog_fields.php and ModuleCatalogEdit.php.

    I'm using a recent xampp version (downloaded and installed earlier this year), so that's MySQL server version 5.5.8

    Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
    MySQL client version: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $
    PHP extension: mysqli

  2. #2
    User MacKP's Avatar
    Join Date
    06-19-09.
    Location
    Duisburg (Germany)
    Posts
    211

    Default Re: Adding backquotes to SQL statements

    Hm never had such a thing...
    Did you have the error Messages?

    regards
    Mediendepot Ruhr
    For real-time chat the (inofficial) Chatroom in IRC:
    -> irc.freenode.net #contao | irc.freenode.net #contao.de

  3. #3
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Adding backquotes to SQL statements

    Yes, it said unknown column name. I find it strange as I'd expect the queries to work without backquotes. But it seems it is best to just add them?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •