put entire select statement inside php section