Here's an example of php code to make a connection to mysql and perform a select query using adodb :
include('adodb.inc.php'); # load code common to ADOdb
$db = &ADONewConnection('mysql');
$db->PConnect("localhost", "root", "password", "database");
$recordSet = &$conn->Execute('select * from products');
if (!$recordSet)
print $conn->ErrorMsg();
else
while (!$recordSet->EOF) {
print $recordSet->fields[0].' '.$recordSet->fields[1].'<BR>';
$recordSet->MoveNext();
}
$recordSet->Close(); # optional
$conn->Close(); # optional
?>
Do i have to use
$db = &ADONewConnection('mysql');
$db->PConnect("localhost", "root", "password", "database");
and
$recordSet->Close(); # optional
$conn->Close(); # optional
each time i want to make a query to unsure the error of max_connection reached ?
How can i manage when 1000 users or more are connected to my website with MySQL's max_connection = 100 ?