";
echo "
";
if (!$found)
{
//No result found, want to add a new parent?
echo "
No sets found
"; } } function getMyParent($parentID, $link) { #TODO: Move the connection away from here, use whatever the main system uses globally $sql = "SELECT name FROM parent WHERE id=$parentID;"; $res = mysqli_query($link, $sql) OR die(mysqli_error($link)); if(!$res) { } else { $row = mysqli_fetch_assoc($res); if (!$row['name'] || $row['name']=="") $name = "none"; else $name = $row['name']; return $name; } } mysqli_close($link); ?>