For example, for some queries like SELECT MAX(field), the query result is usually only a field value, rather than returning rows to you.

Now the field of the value I wanna get is integer type.  

As I'm a beginner of php, how can I get that value from the query result?  

As I do the following

```
$query = "SELECT MAX(stringid) FROM XMLString";
$result = mysql_query($query, $link);
echo $result;

```

Then nothing is echoed out.
I have check the db connection made by mysqlconnect, and it's got no problem.  

And I tried this query in MySQL at phpMyAdmin, then the query is what I want, too?

So why would it be like that, and any solution?

Thanks!