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 9266427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:18:57+00:00 2026-06-18T14:18:57+00:00

A form is retriving data from a MySQL database. $query = $link->query(SELECT Date_ggmmaaaa AS

  • 0

A form is retriving data from a MySQL database.

$query = $link->query("SELECT Date_ggmmaaaa AS Date 
                       FROM table
                       WHERE Date_aaaammgg BETWEEN CURDATE() + 0 - INTERVAL 1 MONTH + 0 AND CURDATE() + 0");

while($result = $query->fetch_object) {     
    $date.= "<string>".$result->date."</string>";

}

Now when I echo $date, which is ALWAYS gg.mm.aaaa I’d like to add 1 day.

For example if I have:

09.02.2013 -> I want to echo 10.02.2013

10.02.2013 -> I want to echo 11.02.2013

How can I reach that?

EDIT:

WORKING WELL SOLUTION

$query = $link->query("SELECT date_ggmmaaaa AS date, test FROM table WHERE date_aaaammgg BETWEEN CURDATE() + 0 - INTERVAL 1 MONTH + 0 AND CURDATE() + 0 AND div1 = 0 AND div4 <> 0");

while($result = mysqli_fetch_array($query)) {
        $dt = DateTime::createFromFormat('d.m.Y', $result['date']);
        $dt->modify('+1 day');
        $result['date'] = $dt->format('d.m.Y');
        $date .= "<string>".$result['date']."</string>";
        $test .= "<number>".$result['test']."</number>";
}
  • 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-18T14:18:58+00:00Added an answer on June 18, 2026 at 2:18 pm
    $dt = DateTime::createFromFormat('d.m.Y', $result->date);
    $dt->modify('+1 day');
    $result->date = $dt->format('d.m.Y');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the codeigniter framework, I'm retrieving data from the database in the form
I'm trying to create a windows form application that manipulates data from several tables
Hi I have a windows form application. its has a database table with two
I have 1 select, 2 text inputs & some JSON data in a form:
Possible Duplicate: Populate a Drop down box from a mySQL table in PHP I'm
I have written php code to retrieve data from database to div in webpage.i
I am facing some problems with JFreeChart with Java. I am retriving data from
My query is $query = SELECT * FROM cartmatch WHERE CARTNO=$cart4; and I'm receiving
I'm creating multiple form retrieving data from jquery. after that i want to work
Form is made from a function that prints out all rows that are awaiting

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.