-1
$result = mysqli_query(Db::$link,"
    select * 
    from `ka_fatora`
    where  DATE_format(`date`,'Y')='2017'
");

date = I want to select value after converting it to (Y)// y : year the value in database as 1485921351.

2

1 Answer 1

1

Try Below MySQLi Query

$result = mysqli_query(Db::$link,"
    SELECT * FROM `ka_fatora`
    WHERE DATE_FORMAT(FROM_UNIXTIME(date), "%Y")='2017'
");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.