.i have the following code:
$task_id = mysql_query("SELECT MAX(task_id) from it_task");
echo $task_id;
.what I want to do is to get the highest value from a field named task_id on the table it_task. Instead of getting a result which is an integer I get “Resource id #5”. how do i get around this?
mysql_query generates a resource which you then have to read using another mysql_ function. In this case you’ll need a 2nd line to read from the query’s result: