Quote:
Originally posted by 2cool2
<?php
$maxthreads = 6;
$dbservertype="mysql";
$servername="xxxxxx";
$dbusername="xxxxx";
$dbpassword="xxxxx";
$dbname="xxxxx";
$pwdincp=0;
$technicalemail = "xxx@xxx.com";
$usepconnect = 1;
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM thread ORDER BY lastpost DESC LIMIT $maxthreads";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<b><a target=new href=\"http://www.domain.com/forum/showthread.php?threadid=$latest_array[threadid]\">$latest_array[title]</a><br><br></b>";
}
?>
---------------------------------------------
My Question
The script is opening a session with MySQL, Is it closing it?
Yes or No? If No, How to make the script close the session?
Thanks you very much!
|
Yes, it does close the connection.
By the way: Did you include all the code that you have here? - The code above seems quite weird.
I guess you "accidentiallly" left out important bits. Like why does it say "use pconnects" when it actually have no option for doing so.
If you're actually using pconnects (which is not shown above), then no, it does not close the connection.