Mombu the Php Forum

Mombu the Php Forum > Php > PG: Table last updated?
REGISTER NOW! Search Today's Posts Mark Forums Read




Reply
 
Thread Tools Search this Thread Display Modes
1 23rd October 19:48
thelist@tonygrimes.com (tony
External User
 
Posts: 1
Default PG: Table last updated?



We've got a huge table in one of our Postgres databases and nobody seems to
know what it's for. Do any of the system tables keep track of the last time
the table was altered (i.e. Row INSERTs, UPDATEs, etc)?

Tony
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


2 29th October 01:16
bastien_k
External User
 
Posts: 1
Default PG: Table last updated?



Is logging turned on?

bastien


----------------------------------------> Date: Tue, 23 Oct 2007 16:12:14 -0600> From: thelist@tonygrimes.com> To: php-db@lists.php.net> Subject: [PHP-DB] PG: Table last updated?>> We've got a huge table in one of our Postgres databases and nobody seems to> know what it's for. Do any of the system tables keep track of the last time> the table was altered (i.e. Row INSERTs, UPDATEs, etc)?>> Tony>> --> PHP Database Mailing List (http://www.php.net/)> To unsubscribe, visit: http://www.php.net/unsub.php>

__________________________________________________ _______________
R U Ready for Windows Live Messenger Beta 8.5? Try it today!
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger
  Reply With Quote
3 29th October 01:16
thelist
External User
 
Posts: 1
Default PG: Table last updated?


I'm not sure. How can I tell? This database is running on a different server
than the one that created the data. I'm trying to restore a fried server
from a backup. Not sure if that matters.

Tony
  Reply With Quote
4 1st November 18:03
stephen.sunderlin
External User
 
Posts: 1
Default Phpmailer sending duplicate messages...


It seems to be ccing each email to everyone and I'd like it to only include
one email address with each email. I've tested in on three of my personal
emails and I see to get six messages in my inbox.

I'm also sending about 4000 emails and would like some pointers to avoid
time out errors.

Finally for the life of me can't figure out how to execute an insert
statement to record a history of each email sent. When I include the insert
statement, no emails are send.

Following is the code.

Any help or direction would be greatly appreciated.

Thanks.

**************************


<?php

require("class.phpmailer.php");
$mail = new PHPMailer();

include ("cxnfile");
$cxn = mysqli_connect($host,$user,$password,$database)
or die ("Couldn't connect to server");

$query = "select *
From db
where groupid = groupid";

$result = mysqli_query($cxn,$query)
or die("Couldn't execute select query.");

while($row = mysqli_fetch_assoc($result))
{
extract($row);

$mail->IsSMTP();
$mail->Host = "host.com";
$mail->From = "info@host.com";

$mail->From = "info@host.com";
$mail->FromName = "Company";
$mail->AddAddress("$email", "$Contact");

$mail->IsHTML(True);
$mail->Subject = "$Subject";
$mail->Body = "$PR";
$mail->WordWrap = 50;

if(!$mail->Send())
{
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
}
else
{
echo 'Message has been sent.';
}

}
  Reply With Quote
5 1st November 18:05
instructicc
External User
 
Posts: 1
Default Phpmailer sending duplicate messages...


I bet your while loop over the "extract" is causing you to have:
user1
user1, user2
user1, user2, user3,...

Instead of polluting your symbol table, can't you just use the email field?
$email = $row['theEmailField'];

I've used code like this back in the day (Notice how the array $arr was unset):
$recipients = "arr[]=user1@example.com&arr[]=user2@example.com&arr[]=user3@example.com";
parse_str($recipients);
for($i=0; $i<count($arr); $i++){
mail("$arr[$i]", "$subject", "$message", "From: <$sender>\n". "Reply-To: <$sender>\n");
}
unset($arr);


__________________________________________________ _______________
Boo!*Scare away worms, viruses and so much more! Try Windows Live OneCare!
http://onecare.live.com/standard/en-...wl_hotmailnews
  Reply With Quote
6 1st November 18:05
stuttle
External User
 
Posts: 1
Default Phpmailer sending duplicate messages...


You're re-using the same message each time around the loop. Each time
you call AddAddress you're, erm, adding another address. You either need
to reset the recipients or reset the message each time round the loop
(I'm not familiar with Phpmailer so I have no idea how to do this).

-Stut

--
http://stut.net/
  Reply With Quote
7 1st November 18:05
instructicc
External User
 
Posts: 1
Default Phpmailer sending duplicate messages...


Stut is right.

If you put
$mail = new PHPMailer();
within the while loop, you should be okay.

__________________________________________________ _______________
Climb to the top of the charts!* Play Star Shuffle:* the word scramble challenge with star power.
http://club.live.com/star_shuffle.as...textlink_ oct
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes







Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
Also visit Ogoun the Usenet Archive
666