Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8089389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:22:50+00:00 2026-06-05T19:22:50+00:00

Alright so I have no idea how to even begin doing this But basically

  • 0

Alright so I have no idea how to even begin doing this
But basically I have one of the menus that displays on every page come getting it’s text and links from a mysql database.

Here’s the code:

<table class="LeftMenuTable">
<?php
    // Generates the left menu from the LeftMenu_items table
    $result = MySqlQuery("SELECT * FROM Menu_LeftMenu;");
    while ($row = mysqli_fetch_assoc($result))
    {
        if ((int)$row['header'] == 0)
        {
            // echos value is on or not
            echo "<tr><td class='LeftMenu'><a href='" . $row['url'] . "'>" . $row['text'] . "</a></td></tr>";
        }
        else if ((int)$row['header'] == 1)
        {
            // header
            echo "<tr><td style='border:0px; height:5px;'></td></tr>";  // adds extra empty tabel
            echo "<tr><td class='LeftMenuHeader'><b><strong>" . $row['text'] . "</strong></b></td></tr>";
        }
    }
?>
</table>

function MySqlQuery($Query)
{

    $result = $mysqli->query($Query) or die(ReportMysqlError(mysqli_error($mysqli), $Query));
    return $result;
}

I feel like any sql queries that could be be replaced by html cache somehow are reducing the site’s speed.

If anyone has any information or suggestions it’s much appereciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:22:51+00:00Added an answer on June 5, 2026 at 7:22 pm

    If you were keen enough, I would suggest a slightly different approach.

    If you make your pages using a templating language called “Smarty” find out more here. http://smarty.net you should find that smarty will manage the caching for you.

    How is this related to your question.

    1. It will make your web development easier as you will stop “echoing” content into your HTML.
    2. Smarty will do the caching for you. When a smarty template loads, smarty keeps a copy of it (or you can tell it cache a file for x hours, days etc).
    3. As you site grows smartys caching will help keep your site running and loading fast.
    4. You have to very little work to make caching work, just use smarty templates to build your site.
    5. Lastly you may find it a LOT simpler to build sites using smarty.

    John.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright. The idea is that I have a jCarousel list that displays 3 items
Alright, I presented this question on the MSDN forums but have yet to receive
I realize that this topic have been brought up sometimes, but I find myself
Alright, let's say I have a table that looks like this: ID | DATE
Alright I am stuck on this and I have no idea what I am
Alright so I have a JFrame that I have a KeyListener added to, and
Alright so I have a task, that I have to let the client try
Alright, So I have an issue that is a bit weird. I am using
Alright, I have a UIView which displays a CGPath which is rather wide. It
Alright, I have a wordpress site, that I want to have a clientportal built

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.