简体   繁体   English

随着日期的变化将数据传输到另一个表。

[英]transfer data as day changes to another table.

This is my php code... 这是我的PHP代码...

<?php
    require("conn.php");
    $query = "SELECT * FROM temp";
    $result = mysqli_query($con,$query);
    while($line = mysqli_fetch_array($result))
    {
     ?>    
       <label>1. <?php echo $line[0]; ?></label><br/>
    </div>
    <div class="one_quarter">
      <label >2. <?php echo $line[1]; ?></label><br/>
    <?php
              }
              mysqli_close($con);
     ?>

Temp table contain 3 columns ie r1 , r2 , days . Temp表包含3列,即r1r2days here I am displaying r1 and r2 . 在这里我显示r1r2 And days contain day name. 并且天包含天名称。 If suppose day name is Monday then I want to display r1 and r2 in another html table on Tuesday. 如果假设日期名称为星期一,那么我想在星期二在另一个HTML表中显示r1r2 Notice that I am saying on Tuesday. 请注意,我在星期二说。 That html table remain empty on Monday but when Tuesday comes then values of r1 , r2 for Monday should be displayed in that html table. 该html表在星期一保持为空,但当星期二到来时,则应在该html表中显示星期一的r1r2值。 It should like this 它应该像这样 在此处输入图片说明 Means if two names which are displaying above are for monday then on tuesday, that both names should be displayed in below html table. 意思是如果上面显示的两个名字是星期一,那么在星期二,两个名字都应该显示在下面的html表中。 Remember on tuesday. 记得在星期二。

I want to display that two values in html table in monday column automatically on tuesday. 我想在星期二自动在星期一列的html表中显示两个值。

It it possible with cron job? cron工作有可能吗?

<?php
echo date('F jS, Y', strtotime('Monday next week  2014-12-18'));
?>

http://php.net/manual/en/datetime.formats.relative.php http://php.net/manual/en/datetime.formats.relative.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM