Jump to content

Best Method?


Xtremer360

Recommended Posts

The following query code works correctly, however, I'm trying to figure out which is best when working with themes, templates, content pages. My themes are my different versions of the main site designs. As of right now I have the following code plus the database structure.

 

site_themes - id, theme_name, status_id (only one theme can have a value of 1(active) at any given time)

 

site_templates - id, template_name, header_code, footer_code, status_id (any can have a value of 1(active) at any given time,

 

<?php

require("kowmanager/config/database.php");

$site_variables_query = "SELECT * FROM site_variables WHERE id = '1'";
$site_variables_result = mysqli_query($dbc, $site_variables_query);

$row = mysqli_fetch_array($site_variables_result, MYSQLI_ASSOC);

$site_theme_query = "SELECT * FROM site_themes WHERE status_id = '1'";
$site_theme_result = mysqli_query($dbc, $site_theme_query);

$row2 = mysqli_fetch_array($site_theme_result, MYSQLI_ASSOC);

if ($row['site_is_down'] == 'Yes') {
    
} else {
    echo "site is up";
}

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.