In PHP, it is possible to do things like $results = mysql_query("select ....");
(see how no link identifier was provided).
The only thing that requires is that a mysql_connect() function has been called before, successfully.
Now I tend to alway provide a link identifier but I don’t really know why.
Is calling queries without a link identifier any less secure than the other way (providing the link identifier in every query)?
The link identifier is needed when you have an application that needs to connect to more than one database server in the same request/transaction.
It’s a good idea to use it even if you only have one database. “Explicit is better.” Oh wait, that’s Python.