Jump to content

Recommended Posts

hi all, im trying to show 2 different classes based on dates, I have this function ...


        <?php   
           $timeStmp=mktime($row_rsworksorders1['intraartapproval']);
if($timeStmp+1209600 > time())
{ ?>
<tr style="background-color:black;" class="<?php echo @$cnt1++%2==0 ? "" : "KT_even"; ?>">
<?php }
else
{ ?>
<tr class="<?php echo @$cnt1++%2==0 ? "" : "KT_even"; ?>">
<?php } ?> 

 

Ive tried echoing both time() and $timeStmp only there both displaying the same,  1274157756 seconds which is from 1970. Anybody give me an idea on whats happening?

         

Link to comment
https://forums.phpfreaks.com/topic/202166-mktime-not-working/
Share on other sites

Hi Ken,

 

It should be a date relative to a job id which I have specified in a recordset...

$query_rsworksorders1 = "SELECT worksorders.intrajobno, worksorders.intratype, worksorders.intrastatus, worksorders.intracustomer, worksorders.intradescription, worksorders.intraorder, worksorders.intraartapproval, worksorders.intraestimatedinstall, worksorders.intraprio, worksorders.intrajobvalue, worksorders.intraterms, worksorders.intrajobref, worksorders.id, worksorders.intradelete FROM worksorders WHERE {$NXTFilter_rsworksorders1} AND worksorders.intradelete != 0 ORDER BY {$NXTSort_rsworksorders1}";

 

Ive just echo'd the variable however but its outputting nothing which is obviously the problem  :confused:

Link to comment
https://forums.phpfreaks.com/topic/202166-mktime-not-working/#findComment-1060130
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.