3rd party code for pl
Moderators: Dragonrider, J_S, Hernol, vancoovur, H2B2, Heritage
by H2B2 » 2:35am, Fri 07 Mar, 2008
This script by robidigital (originally from
this thread) has been copied here for your convenience:
robidigital, on 05 Jul, 2007 wrote:I created a small php script to check the number of email sent. It does the same thing as the sql query geckoday posted for monitoring. All you have to do is plugin the database settings. Hope this helps.
- Code: Select all
//database settings
$dbname = "XXXX";
$dbhost = "XXXX";
$dbuser = "XXXX";
$dbpass = "XXXX";
$dbh=mysql_connect ($dbhost, $dbuser, $dbpass) or die ('I cannot connect to the database because: ' . mysql_error());
$query = "select count(*) FROM phplist_usermessage WHERE messageid=19";
$sendcount = mysql_db_query($dbname,$query);
$mycount = mysql_result($sendcount,0);
echo '<p><strong>' . $mycount . '</strong> mailings have been sent</p>';
Last edited by
H2B2 on 11:08pm, Mon 15 Dec, 2008, edited 1 time in total.
-
H2B2
- phpList Guru
-
- Posts: 5890
- Joined: 1:51am, Wed 15 Mar, 2006
by robidigital » 4:53pm, Thu 22 May, 2008
This one uses a variable to set the message ID you want to track rather than putting it directly into the query string.
- Code: Select all
//database settings
$dbname = "XXXX";
$dbhost = "XXXX";
$dbuser = "XXXX";
$dbpass = "XXXX";
$dbh=mysql_connect ($dbhost, $dbuser, $dbpass) or die ('I cannot connect to the database because: ' . mysql_error());
//which message? - set the ID of the message you are sending
$msgid = 29;
//mysql_select_db ($dbname)
$query = "select count(*) FROM phplist_usermessage WHERE messageid=$msgid";
$sendcount = mysql_db_query($dbname,$query);
$mycount = mysql_result($sendcount,0);
echo '<p><strong>' . $mycount . '</strong> mailings have been sent</p>';
Ryan Robillard
www.RobiDigital.com
Hagerstown, Boonsboro, Frederick, MD web site design, development and graphic design
-
robidigital
- phplist newbie
-
- Posts: 3
- Joined: 7:23pm, Tue 30 May, 2006
by H2B2 » 8:47pm, Tue 27 May, 2008
Nice improvement on your script robidigital !
Would be nice to have this as a plugin to avoid the need to put database username/password in the script itself.
Anyway, thanks for keeping us up-to-date with your improvements

-
H2B2
- phpList Guru
-
- Posts: 5890
- Joined: 1:51am, Wed 15 Mar, 2006
by CS » 4:45am, Mon 15 Dec, 2008
I decided to go ahead and run this through the Pluginator(TM) to make it easier for all to use. I also beefed it up and streamlined it a bit. Just download the
zip from here and unzip it to your plugins directory.
It'll show the number sent for all messages with status of either "inprocess" or "suspended" along with their status, id and subject.
-
CS
- phplist newbie
-
- Posts: 0
- Joined: 10:00pm, Thu 29 Jan, 2009
by H2B2 » 11:08pm, Mon 15 Dec, 2008
Thanks CS!
I'll give it a try as soon as I can find some spare time.
-
H2B2
- phpList Guru
-
- Posts: 5890
- Joined: 1:51am, Wed 15 Mar, 2006
Return to Add-ons, Contributions, Mods, Plug-ins
Who is online
Users browsing this forum: No registered users and 0 guests