Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well that is done by PHP . </p> <p>There are 2 thing that you could do. First of all you have to save the date/time that your blog has been added in another col. Then you have to check IF the blog date/time i NOT today .</p> <p>So, if you choose to youse the <a href="http://us3.php.net/manual/en/function.date.php" rel="nofollow">Date()</a> function: [d.m.Y or 11.06.2015] example:</p> <pre><code> &lt;?php $q = mysql_query(...);//your query while($r = mysql_fetch_array($q)) { $date = $r['date'] // the row that you had to create in mysql to write the post date there .. $today = date("d.m.Y"); // this wil output the TODAY date in the format from above [..] if($today == $date){ $new = "IT'S NEWWW !!! "; }else{ $new=" its not new :( ";} echo " blog post -&gt; added in ".$date." -&gt; $new &lt;br /&gt;"; } ?&gt; </code></pre> <p>Well, thats ok, but there is another way of saving the time, and thats by the <a href="http://us3.php.net/manual/en/function.time.php" rel="nofollow">TIME()</a> function example:</p> <pre><code> $q = mysql_query(...);//your query $status = ""; while($r = mysql_fetch_array($q)) { $date = $r['date']; // this wil output the datey in this way -&gt; 124341241451 $now = time(); // NOW in ms $days_need_to_pass = 1; // how many days you want to say -&gt; NEW if( $date &gt; ($now - ($days_need_to_pass * 86400)) ) { $status = " &lt;b&gt;NEW&lt;/b&gt; "; } echo "blog post -&gt; added -&gt; ".date("d.m.Y", $date)." -&gt; ".$status." &lt;br /&gt;"; } </code></pre> <p>It's not simple but i hope you understand .. :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload