In some scripts I'm accessing the database several times and various different tables and I'm wondering about how server intensive that would be. I can't think of a better way of doing it but it does concern me.
Also I am including the following file at the top of every script:
Code: Select all
<?php
$dbh = @mysql_pconnect("localhost");
if (!$dbh)
{
echo("<H3>Failed to connect to database server</H3>");
exit();
}
if (! @mysql_select_db("project") )
{
echo("<H3>Failed to find your database</H3>");
exit();
}
?>Thanks!