Method I :
SELECT count('id') as cnt,order_status,order_date FROM `product_order`
group by MONTH(order_date)
Method II :
SELECT count('id') as cnt,order_status,order_date FROM `product_order`
group by DATE_FORMAT(order_date, '%m')
Method III:
SELECT SQL_NO_CACHE YEAR(record_date), MONTH(record_date), COUNT(*) FROM stats
GROUP BY YEAR(record_date)*100 + MONTH(record_date)
SELECT YEAR(date_column), MONTH(date_column), COUNT(*)
FROM date_table
GROUP BY DATE_FORMAT(date_column, '%Y%m')
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Monday, 30 June 2014
MySQL Query GROUP BY day / month / year
Google Maps Image APIs
Get Google Map Image for specific latittude & longitude
Static Maps API <img src="http://maps.google.com/staticmap?size=500x400&markers=11,78&zoom=12"><img src="http://maps.googleapis.com/maps/api/streetview?size=200x200&location=40.720032,-73.988354&heading=235">
![]()
Saturday, 28 June 2014
How to generate passoword in php with specific length?
function generate_password( $length = 8 ) {
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$password = substr( str_shuffle( $chars ), 0, $length );
return $password;
}
Subscribe to:
Comments (Atom)
Feet/Inches to Meters Converter & Lbs to Kgs Converter
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...
-
<?php $to = "somebody@example.com, somebodyelse@example.com"; $subject = "HTML email"; $message = " <h...
-
document.onkeydown = myKeyDownHandler; function myKeyDownHandler(event){ alert(event.keyCode) }
-
<?php $date1 = "2015-01-23 00:20"; $date2 = "2015-01-23 05:30"; $seconds = strtotime($date2) - strtotime($date1);...