Hello All,
I want mysql_query to result in an warning/error if the link identifier from the mysql_connect is NOT used in the MySQL query.
Example:
$conn = mysql_connect("localhost", "username", "password");
mysql_select_db("dbname", $conn);
$result = mysql_query("SELECT * FROM tablename', $conn); //No error
$result = mysql_query("SELECT * FROM tablename'); //Could not connect to db error
I'm working with objects and only want to be able to query inside the object, but for some reason, the connection stays open outside the object.
Any ideas?