if you have MySQL table like below image
if you want to fetch second highest salary of employee following query will be useful for you.
select sal from emp group by sal order by sal desc Limit 1,1
your output will be like below image
if you want to fetch all employee which have second highest salary following query will be useful for you.
select * from emp where sal=(select...
I am ubed khan php developer have an 5years plus experience in web development lives in Nagpur India. I have knowledge about phonegap, cakephp ,mysql , jquery, javascript, ajax, html5, and css.
Monday, July 30, 2012
Sunday, July 22, 2012
How to delete all inside folder
This function is useful to delete all inner folder of given path of folder.
Lets explain in example:
if you have folder which name is user_1 and user_1 have lots of folder like (my_album, my_profile,friends_photo etc.)
if you want to delete folder (my_album, my_profile,friends_photo etc.) call function like belew
<?php
deleteDirectory($dir); // $dir = path of user_1 folder
?>
function deleteDirectory($dir) {
if (!file_exists($dir)) return true;
if (!is_dir($dir)...
Saturday, July 21, 2012
Date after 10 days
$your_date = '2012-07-21';
$date_after_ten_days = date("Y-m-d",strtotime(date("Y-m-d", strtotime($your_date)) . " +10 day"));
echo $date_after_ten_days; //output 2012-07-...
Subscribe to:
Posts (Atom)