$page = $_GET['page'];
$p_id = project_id_from_project_name($page);
$project_tasks = tasks_list($p_id);
function PrintR($project_tasks) {
echo '<pre>';
print_r($project_tasks);
echo '</pre>';
}
$page displays the correct thing and $p_id displays the id of the project, which is used in the function tasks_list shown below:
function tasks_list($p_id) {
$project_tasks = array();
$p_id = (int)$p_id;
$func_num_args = func_num_args();
$func_get_args = func_get_args();
$project_tasks = mysql_fetch_assoc(mysql_query("SELECT `task_name` FROM `tasks` WHERE `project_id` = $p_id"));
return $project_tasks;
}
The query is working and tested on my database however print_r displays no data?
Cannot see why?
Thanks