Below query is providing result of 22 rows in my sql
select pk.partnerid
, pk.id as packageId
, pk.name as package
, p.partnername as partner
, bp.name
, bp.bookedDate
, bp.email
, bp.phone
from packages as pk
join bookpackage as bp
on bp.pkId = pk.id
left
join partner as p
on p.id = pk.partnerid
where pk.status > 0
order by (bookedDate is null) asc
, bookedDate asc
where as the same in application provides only 3 rows which has not null dates
mysqli_query($con, "
select pk.partnerid
, pk.id as packageId
, pk.name as package
, p.partnername as partner
, bp.name
, bp.bookedDate
, bp.email
, bp.phone
from packages pk
join bookpackage bp
on bp.pkId = pk.id
left
join partner p
on p.id = pk.partnerid
where pk.status > 0
order
by (bookedDate is null) asc
, bookedDate asc
");
I want to show all data and order by date if date is not null.