This is beacuse your trying to display the Link ID from a MySQL connection.
When you execute a mysql_query on a select stament, it returns a result set.
To retrive the contents of the result set you use either
mysql_fetch_row
or
mysql_fetch_assoc
this will then return an array, that can then either be selected as $variable[0]/$variable[1] ... [2] [3] ... and so on or $variable['column1'] / $variable['column2'] where colum1 & column2 would be the names of the columns in your database.
There is a simple but easy to understand example of retrieving rows from a database in the MySQL manual section at the PHP web site, this can be found at
http://uk.php.net/manual/en/book.mysql.php
Cheers
Shawty