ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

deactivate SQL query caching for certain function in a template

February 24, 2010 4:52am

Subscribe [1]
  • #1 / Feb 24, 2010 4:52am

    Nico Smit

    48 posts

    Hi,

    For a project I’m using a PHP-enabled template for selecting data from the database and processing form data. Therefore, I’m using something like:

    <?php
    global $LOC, $FNS, $IN, $DB, $REGX;
    
        $sql = "SELECT field FROM `exp_table` WHERE template = 'npl' AND code = '".$DB->escape_str(strtoupper(trim($code)))."'";
        $query = $DB->query($sql);
        if ($query->num_rows == 1)
        $data = $query->row['field'];
    ?>

    Because I’ve “Enable SQL Query Caching” enabled, data is cached. Is there a way to deactivated caching for a certain template / function or do I’ve to use my own mysql queries?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases