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 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 question about YAJLiOS parser... I have next json data : {{ body
I have next html: <label for="user_name"> <abbr title="required">*</abbr> Name </label> And I want to
I have a C programming question on the implementation of a hash table. I
I have a specific question, I have a link in a table in the
I have a question about usability/design. I currently am using some JQuery to hide/show
I have a table of Users, Each USR_ID can have multiple Roles,Views,Brands and Units.
I had a question related to phpmyadmin. I have a table with the following
I am studying Haskell. I have the next question: The List type is a
I have this homework question: Assume a Database table has 0 records at time
I have a table called products in a MySQL database. products looks some what

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.