Solved both issues! I simply commented out the "log cron action" line since we should have it set to not log anyway.
To fix the issue with it not updating properly once all of a user's photos have been deleted:
Find this line:
Code:
$link2 = mysql_connect ('localhost', 'VBmysqlusername', 'VBmysqlpassword') or die ('I cannot connect to the database. Forum');
mysql_select_db ("VBdatabasename") or die ('could not connect: ' .mysql_error());
NOTE: Your line will be different as you will have already edited in your account infos.
Move the entire line of code above this line:
Code:
while($row = mysql_fetch_array( $result ))
Then, between the $link2 and while lines, add this:
Code:
mysql_query("Update vb_user SET photos = '0';");
The final code should look like this:
Code:
$result = mysql_query("Select userid, user, Count(*) AS num FROM pp_photos Group BY userid;")
or die(mysql_error());
$link2 = mysql_connect ('localhost', 'VBmysqlusername', 'VBmysqlpassword') or die ('I cannot connect to the database. Forum');
mysql_select_db ("VBdatabasename") or die ('could not connect: ' .mysql_error());
mysql_query("Update vb_user SET photos = '0';");
while($row = mysql_fetch_array( $result ))
I have updated the attachment in the first post if you'd like to use that to compare instead.
Let me know if you have any questions or problems!