SELECT prud.* FROM prud WHERE ( prud.pruname LIKE '%%' or prud.barcode LIKE '%%' ) and prud.okw='1' and prud.status='1' and pin!=1 Limit 36, 36