Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2009
    Posts
    417
    Plugin Contributions
    2

    Default Documentation Plugin SQL Installation

    ZC 1.5.7
    Trying to write a new plugin. I have a few questions re the SQL installer Class and how to write one if i need to.
    The current version of zen cart reports errors if you use multi line SQL for use in install sql patch in zen cart admin. so

    Does the new installer method use the same validation and have the same requirements for multi line sql as the install sql patch in admin? e.g.
    I want to run the following Query
    Code:
    INSERT  IGNORE INTO products_location (products_id, products_location)
    SELECT products_id,"" FROM  products ;
    to cope with the select from products in the insert it needs to be on a new line.
    Is this still true if I just use straight sql for the install and will it still produce the same erroneous error message?

    You quote in the documentation an example of how to create an installer class. However there is no link to the plugin. When I look at the plugins i can find the one quoted but is does not use the installer class. Does the example exist? if so can i see it? It may be easier to code a sql installer than it is to correct the issue above.
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Documentation Plugin SQL Installation

    Quote Originally Posted by brittainmark View Post
    ZC 1.5.7
    The current version of zen cart reports errors if you use multi line SQL for use in install sql patch in zen cart admin. so

    ... if I just use straight sql for the install and will it still produce the same erroneous error message?
    What "erroneous error message" are you referring to?

    Are you referring to this issue that was fixed? Re: [Done v157a] Spurious error message Query incomplete: missing closing semicolon.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Apr 2009
    Posts
    417
    Plugin Contributions
    2

    Default Re: Documentation Plugin SQL Installation

    Yes just seen 1.5.7a.
    Unfortunately it was not fixed now get error as it is no longer capable of processing multi line sql statements if you have a prefix present!
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  4. #4
    Join Date
    Apr 2009
    Posts
    417
    Plugin Contributions
    2

    Default Re: Documentation Plugin SQL Installation

    My above statement is not true. It works fin I had double spaces in my query that cause the issues.
    So I assume that it uses the same module.
    If i want to write a sql installer class is it as simple as creating the install and uninstall functions and putting what i need in them?
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  5. #5
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Documentation Plugin SQL Installation

    The inbuilt DisplayLogs plugin contains an example of using an Installer Class

    e.g. zc_plugins/DisplayLogs/v3.0.0/Installer/ScriptedInstaller.php

 

 

Similar Threads

  1. Bakup SQL Plugin
    By mprough in forum General Questions
    Replies: 1
    Last Post: 11 Sep 2019, 07:21 PM
  2. v155 Plugin sql, auto-installer, self-deletion
    By torvista in forum Contribution-Writing Guidelines
    Replies: 6
    Last Post: 26 Sep 2017, 01:26 PM
  3. Related Products Plugin SQL Error 1366
    By danielosko in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 9 Mar 2014, 08:25 PM
  4. Admin New Customer Plugin Installation Problem
    By mcelmac in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 4 May 2013, 08:24 PM
  5. Protx Installation sql error
    By Manor in forum Addon Payment Modules
    Replies: 1
    Last Post: 21 May 2009, 09:42 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR