Updated data.php with new query