Try this code. You can also change the sql, instead of
select use
insert into
$sql = "SELECT h.stand_id, h.type, h.no_of_stands,h.date, v.vname , v.thumb, c.cname , c.ctype, h.price
FROM stand h, tbl_categories c, tbl_vendors v
WHERE h.cid = c.cid
ORDER BY type";
$result = dbQuery($sql);