Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    help question init_db_config_read.php - overriding 'cgfvalue' after DB read using PHP code

    I have a question regarding some of the ZC3.8 PHP code modules, how they interact with a MySQL database, and how to override data set in this module.

    I have observed that the file init_db_config_read.php reads the configuration fields from the database ('cfgkey'), and then sets each with a value from a different field in the database. '(cfgvalue')

    That much I understand clearly.

    What I wanted to know, because I have a few different ideas in mind, is how I might code an override for a single database config value using additional PHP code.

    I figured that after the init_db_config_read.php module sets up the config values by reading and placing them in the 'cfgvalue' corresponding to the 'cfgkey' , I could just assign new values immediately afterwards, using PHP, in a new module.

    I am not really familiar with PHP, though. I know what I need to code is something like this (in PHP, of course!) :

    if VALUE33 = 5 then 'cfgvalue' (associated with 'CFGkey X ') = "newer"

    OK...I didn't mention that I wanted a place a conditional in here as well, to determine whether to reset the 'cfgvalue'.
    Last edited by Donn; 24 Apr 2009 at 04:38 PM. Reason: clarification......

 

 

Similar Threads

  1. Replies: 5
    Last Post: 3 Jun 2014, 05:42 PM
  2. v151 Using php code in payment module language files?
    By gilby in forum Addon Payment Modules
    Replies: 1
    Last Post: 16 Apr 2013, 05:10 AM
  3. Meta_tags.php not overriding english.php
    By Servelan in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Apr 2011, 12:21 AM
  4. To read session in the init_db_config_read.php
    By arvind21 in forum General Questions
    Replies: 0
    Last Post: 22 Jun 2009, 02:42 PM
  5. hidding affilate code using php
    By bmpt in forum General Questions
    Replies: 7
    Last Post: 16 May 2009, 07:31 AM

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