should each php-script clean up it's mysql connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I just noticed something I haven't done before. I was writing this piece of code:

$articlequery = "SELECT somestuff FROM sometable";
$result = mysql_query($query);
$row = mysql_fetch_row($result);

But I didn't get the result I expected. Finally, I noticed that my new querystring was $articlequery and not $query. The query saved to $query was apperently some old query used in another php-script within my site.

Therefore I wonder: Is it a good behavior to end connections or let every php-script clean up after it self in some way?

--
anders thoresson

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux