Jump to content

mktime not working?


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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.