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

  • Home
  • SEARCH
  • 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 7860949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:30:14+00:00 2026-06-02T22:30:14+00:00

I have webpage that need to be upated for example if the articles in

  • 0

I have webpage that need to be upated for example if the articles in certain tables has passed 7 days then the page will view notification window that there is some old articls need to be updated

How do I check dates across multiple tables?

$sql = "select topic.*
            ,   id.* 
        from    $table_1
            ,   $table2 
        where (date of the article) < (<date  of the article+ 7 days...>)" ;
        // the arctile has passed 7 days 
$rs     = mysql_query($sql);
$nos    = mysql_num_rows($rs);
$obj    = mysql_fetch_object($rs);
if($row = mysql_fetch_array($sql)) 
{ 
    // I want to display window that display note 
    // there is artiles need to be updated and list of those topics"
    <script language="javascript" type="text/javascript">
        function print_msg(opt,id) 
        {
            if(confirm("show old topics")) 
            {
                window.location="home.php";
            } 
            else 
            {
                return false;
            }
        }
    </script>
    //here are the topics need to be updated           
    echo obj->topic;
} 
  • 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-02T22:30:15+00:00Added an answer on June 2, 2026 at 10:30 pm

    I think you have to use UNION ALL to join the rows in both the tables. After joining the rows, you can perform a SELECT on the derived table output to check your date condition. Here is the SQL query. I don’t know about PHP syntax.

    If you want to fetch only distinct rows among the two tables, change UNION ALL to UNION.

    Query: Something along this line in MySQL.

    SELECT id, topic, date
    FROM
    (
        SELECT id, topic, date FROM table1
        UNION ALL 
        SELECT id, topic, date  FROM table1
    ) T1
    WHERE DATEDIFF(date, DATE(NOW())) <= 7
    

    T1 in the above query represents an alias for the derived table output.

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

Sidebar

Related Questions

I have a webpage that has many user-generated elements that need to be cleaned
I have a webpage that contains a form, and i need to refresh the
I have a long URL on a web page in Windows that I need
I need to have a grid on one of my webpages that will be
I have a webpage that has 3 file inputs. There are specific fields on
I have a webpage that plays a 'chime' sound when certain events occur. Problem
I have a webpage that is a Search page. There are a few pre-defined
I have data grids on my webpage that need to be refreshed every few
I have an ancient webpage that I need to instill some databasing capabalities into
I have a webpage that is taking way too long and need to optimize

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.