db->query($sql, array($id)); if (!$res->num_rows()) return false; $res = $res->row_array(); return $res["link"]; } }