$SQL="SELECT Bo.borrow_id,T.tool_name,T.tool_group,Bo.borrow_total,Bo.borrow_date,Bo.borrow_date1,Bo.borrow_name,Bo.borrow_status
FROM borrow_tb Bo,tool_tb T,type_tb TY,brand_tb B
WHERE (((T.tool_id=Bo.tool_id)AND(T.type_id=TY.type_id))AND((B.brand_id=T.brand_id)AND(Bo.borrow_status='N')))LIMIT $start, $pagesize";