tarponkeith
Oct 27th 2007, 12:17 pm
In ASP you would use:
RecordSet.Close
DataBaseConnection.Close
Set RecordSet = Nothing
Set DataBaseConnection = Nothing
Is there anything you need to do with MySQL to clean up resources?
From what I've seen, it looks like:
mysql_close();
is the only thing used to "clean up"...
<?php
$connection = mysql_connect("localhost", "user", "pass") or die (mysql_error());
mysql_select_db("db_table");
$getalldata = mysql_query('select * tablename') or die (mysql_error());
$numrecords = mysql_num_rows($getalldata);
if($numrecords == '0')
{
echo "Nothing! Sorry!";
}
else
{
while ($data = mysql_fetch_array($getalldata))
{
$field_title = $data['field_title'];
$Joke_Text = stripslashes($field_title);
}
}
mysql_close($connection);
?>
Thanks
RecordSet.Close
DataBaseConnection.Close
Set RecordSet = Nothing
Set DataBaseConnection = Nothing
Is there anything you need to do with MySQL to clean up resources?
From what I've seen, it looks like:
mysql_close();
is the only thing used to "clean up"...
<?php
$connection = mysql_connect("localhost", "user", "pass") or die (mysql_error());
mysql_select_db("db_table");
$getalldata = mysql_query('select * tablename') or die (mysql_error());
$numrecords = mysql_num_rows($getalldata);
if($numrecords == '0')
{
echo "Nothing! Sorry!";
}
else
{
while ($data = mysql_fetch_array($getalldata))
{
$field_title = $data['field_title'];
$Joke_Text = stripslashes($field_title);
}
}
mysql_close($connection);
?>
Thanks