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
https://forums.phpfreaks.com/topic/246660-best-method/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.