got php queries working for all data