PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds Installation & Upgrades (http://www.photopost.com/forum/classifieds-installation-upgrades/)
-   -   Questions about sendnotice.php and stats (http://www.photopost.com/forum/classifieds-installation-upgrades/115287-questions-about-sendnotice-php-stats.html)

cdouglas August 16th, 2005 11:34 AM

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

Chuck S August 17th, 2005 04:19 PM

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)";

cdouglas August 18th, 2005 12:56 PM

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97