![]() |
Questions about sendnotice.php and stats I have a new 2.41 install of classifieds that is up and working now. I want to get the sendnotice.php working to do the email notifications. As soon as I enabled, it people were getting send the same email sent over and over every 10 minutes. I fixed that by adding an initial record to pp_stats with an id of 1. Previously it did not exist. The code should have checked for a record and if it wasnt there, done an insert. The problem now is that none of the stats such as items sold and dollar amounts got updated since the editproduct.php tries to update a record in pp_stats with an id of 1 that did not exist. Is there a way for it to go recaculate those stats? The Scan DB / recalculate numbers did not work. Thanks Chris |
Hello Well dont know how to tell you to recalculate things other than to set the status of the expired ads back to approved date and clear the stats table and rerun sendnotice However I will answer your hypothesis that you think we dont insert a record On an install we do indeed insert a record for the stats table so I show the files coded properly. If your install did not have a record of 1 then its unique to you. This is right in our install file. $query[] = "CREATE TABLE {$pp_db_prefix}stats (id int(2) NOT NULL auto_increment, amt_sold float(12,2) NOT NULL default '0', ads_sold int(12) NOT NULL default '0', lastupdate INT(12) NOT NULL default '0', PRIMARY KEY (id) ) TYPE=MyISAM"; $query[] = "INSERT INTO {$pp_db_prefix}stats VALUES (1, 0, 0, 0)"; |
Thank you for your response. I checked my installer and that line is in there as you said it was. Why it didn't work on mine I dont know, but as soon as I created that record, the sold stats started working, as well as the notifications. |
| All times are GMT -5. The time now is 03:45 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0