Yep TFlan is correct

remember SlayerACC that in many cases now you need to add the db link where you did not require it before. Some of it depends on how you perform the task, if you use statments or if you stick with object oriented or stay with procedural style.
The way i understand it, in general if you use statments then you need to open the statement, bind (prepare)the statement, execute the statement, then close the statement each time you use it.
have a look at this
http://www.php.net/manual/en/mysqli....statements.php
there are certainly benefits to having more controls over the process but i chose to stick with object oriented simply because it was quicker and because in my small scripts some of the NON benefits really did not hurt me or the process. So it was just the best call for me.
What i mean by object oriented for me anyway (i guess its actually proceedural) but i like to think of it is object because i have an object result) is this, lets take your example of Mysql and convert it the way i did to MySQLi procedural style
Your example:
PHP Code:
$results = mysql_query("SELECT * FROM TABLE")
or die(mysql_error());
while($row = mysql_fetch_array( $results )) {
echo $row['name'];
}
Here is the conversion the way i did it.
PHP Code:
$query = "SELECT * FROM TABLE";
$results = mysqli_query($link,$query)or die(mysqli_error($link));
while($row = mysqli_fetch_array( $results )) {
echo $row['name'];
}
Hope that helps