join kullanmalısın
örnek
$sql=select * from stokkart left join stokfiyat on stokkart.id=stokfiyat.stokid; gibi