added searchstatus on the sql