include"../../pages/config.php";
$selectrow = mysql_query("SELECT * FROM members");
$query = mysql_fetch_array($selectrow, MYSQL_ASSOC);
//Run business removal
if ($query['Enable'] == "true"){
if ($query['autoRemove'] <= "0"){
$removeSQL = "DELETE FROM AccLink WHERE autoRemove <= 0";
mysql_query($removeSQL);
echo "Business Removed. {$query['username']}<br>";
}
$remove1 = "Update AccLink SET autoRemove = autoRemove -1";
mysql_query($remove1);
echo "Run Sucessfull {$query['username']}<br>";
}
Can anyone see anything wrong with this, it just doesnt seem to remove the buisness.
The process is, each day it will be run and the figure in the mysql database will be the value -1 depending if the column name "enable" is set to true and when it reaches 0 it should remove the row.
i cant get it to work.
also there is about 20 - 30 rows in there that should get the -1.