If you are new and you want to get attribute value then you can get easily. sometime maybe we also need to get custom attribute value, i mean data attribute value. In following example i give you three way to get custom attribute value in jquery.
<pre class="prettyprint lang-html">
<title>Get Custom Attribute Value</title>
<a href="example.com" data-id="1" myname="hd">Ex.....
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.
<pre class="language-mysql">SELECT * FROM items WHERE created_at > DATE_SUB(NOW(), INTERVAL 1 MONTH);</pre>