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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:38:25+00:00 2026-05-23T02:38:25+00:00

I have the next question: I have a table with a ‘datetime’ field in

  • 0

I have the next question:
I have a table with a ‘datetime’ field in it called “last_payment”, the thing i want to do is to show the users how much days left to their subscription (its a monthly subscription) so basically if the value in last_payment is “2011-06-10 12:28:11” and today its 15/06/2011 i want it to show that they have 25 days left.

I have the current code and it doesn’t matter how much time i played with it it doesn’t work when im trying to pull the data from the MySQL but it works when i do a “mktime()” function..:

$today = time();
$row_ct = mysql_fetch_array($result_ct);

//Subscription Counting Funcrion for Clients
$cdate_c = mktime(0, 0, 0, 12, 31, 2009, 0);
$difference_c = $today - $cdate_c;
if ($difference_c < 0) { $difference_c = 0; }

The following aren’t working:

$cdate_c = mktime($row_ct["last_payment"]);
$cdate_c = mktime(strtotime($row_ct["last_payment"]));
$cdate_c = date(strtotime($row_ct["last_payment"]));

Some help?

  • 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-05-23T02:38:25+00:00Added an answer on May 23, 2026 at 2:38 am

    Try

    $cdate_c = strtotime($row_ct["last_payment"]);

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

Sidebar

Related Questions

I have a table story_category in my database with corrupt entries. The next query
I am studying Haskell. I have the next question: The List type is a
Suppose I have table in my DB schema called TEST with fields (id, name,
I have a table called products in a MySQL database. products looks some what
I have a question about the errorPlacement Method in jQuery Validator Plug-in: I want
I'm going to start of by noting that I have next to no python
I have the next function: function setImagesWidth(id,width) { var images = document.getElementById(id).getElementsByTagName(img); for(var i
In my fieldset I have labels next (side) to my textboxes, but for some
How could I best implement the following scenario? I have a Next Period... button
I have First/Last/Previous/Next buttons that change the selected child node of a TreeViewItem. Setting

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.