Example
$dbh = new PDO("mysql:dbname=".DB.";host=".HOST,USER,PASSWORD);
$sql_login = $dbh->prepare("SELECT MAX(`lastlogin`) AS `LASTLOGIN` FROM `admin_users` WHERE `user_id` <> :id");
$sql_login->execute(array(":id"=>0));
$logindetail = $sql_login->fetchAll();
$date = explode("-",$logindetail[0]['LASTLOGIN']);
$login["date"] = date("l, F j Y",mktime(0,0,0,$date[1],$date[2],$date[0]));
$space = explode(" ",$logindetail[0]['LASTLOGIN']); $time = explode(":",$space[1]);
$login["time"] = date("h:i:s A",mktime($time[0],$time[1],$time[2]));
return $login;
Monday, February 9, 2009
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment