Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    120
    Plugin Contributions
    0

    help question How would I code this to an SQL query?

    Hello,

    Could anyone tell me how to code the following in to an SQL command please?

    Code:
        function install() {
          global $db;
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('&copy; Adeel<br /><div><a href=\"http://www.awez.com\" target=\"_blank\">Website</a></div><br />This module is installed', 'MODULE_ORDER_TOTAL_3_FOR_2_DISCOUNT_STATUS', 'true', '', '6', '1','zen_cfg_select_option(array(\'true\'), ', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_3_FOR_2_DISCOUNT_SORT_ORDER', '295', 'Sort order of display.', '6', '2', now())");
        }
    
        function remove() {
          global $db;
          $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
        }
    Many thanks,

    Gary

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How would I code this to an SQL query?

    Why?
    You appear to have hacked that out of an addon. Why not just use the addon to make it happen as intended?
    .

    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.

 

 

Similar Threads

  1. v151 SQL query setup. How do I TEST a query 'off-line'?
    By lewisasding in forum General Questions
    Replies: 3
    Last Post: 8 Mar 2013, 12:24 AM
  2. wHAT DOES THIS ERROR CODE MEAN AND HOW WOULD I FIX THIS?
    By Snaggle in forum General Questions
    Replies: 2
    Last Post: 15 Jun 2011, 10:27 PM
  3. how to do a SQL query?
    By therealex in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 Dec 2009, 11:52 PM
  4. How to insert products by SQL query?
    By zildjian in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 28 Feb 2009, 12:47 AM
  5. How would I do this with an sql query?
    By member in forum General Questions
    Replies: 2
    Last Post: 22 Mar 2008, 05:47 PM

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