SELECT warranty.* FROM warranty,products,user WHERE warrantyid.productsid = products.productsid and products.userid = user.userid and user.name like'%$id%'
select warranty.warrantyid from user inner join products
on user.userid=products.userid inner join warranty
on products.warrantyid=warranty.warrantyid
where user.name like '%$name%'