Tag : Now
ItSolutionStuff.com have tutorials for Now tag, here you can study articles of Now tag, Now tag posts collection, most popular and useful tutorials of Now tag, here you can find list of all relevant posts and example about Now tag, we have lists of tutorials and examples about Now tag. very simple and quick example collection of Latest Now tag.
We may sometimes require to get few days ago records from table like last 2 days, last 3 days, last 10 days or last 15 days etc. Most of developer choose other logic but we can easily get using mysql query(using CURDATE and INTERVAL).
In this example mysql query i have one table "elements" and columns are id, title, description, created_at(timestamps) and update_at, Now we will get all records of last 2 days.so you can fetch fields value using CURDATE and INTERVAL of mysql. In following example you can see how to select data of last two days.
<strong>Query:</strong>
<pre>
SELECT * FROM `elem.....
If you require to get all the records of current year using mysql query. for example you have one table "items" and columns are id, title, description, created_at and update_at, Now you want to get all records of this year. so you can fetch fields value using DATE_SUB and INTERVAL of mysql. In following example you can see how to select data of current year.
<strong>Example:</strong>
<pre>
SELECT * FROM items WHERE created_at > DATE_SUB(NOW(), INTERVAL 1 YEAR);
</pre>
If you require to get all the records of current month using mysql query. for example you have one table "items" and columns are id, title, description, created_at and update_at, Now you want to get all records of this month. so you can fetch fields value using DATE_SUB and INTERVAL of mysql. In following example you can see how to select data of current month.
<strong class="example">Example:</strong>
<pre class="language-mysql">SELECT * FROM items WHERE created_at > DATE_SUB(NOW(), INTERVAL 1 MONTH);</pre>
Jquery - How to copy text to clipboard without flash example ?
Open Post
Laravel 5 - whereIn and whereNotIn with subquery example using query builder
Open Post
Jquery select2 ajax autocomplete example with demo in PHP
Open Post
Laravel 5.3 - Create Bootstrap Contact US Form using Form Request
Open Post
PHP - How to implement Google new reCAPTCHA Code Example with Demo?
Open Post
How to Create Dynamic Sitemap in PHP Codeigniter?
Open Post