Re: plphp: PHP Warning: Call-time pass-by-reference has been deprecated

From: CSN <cool_screen_name90001(at)yahoo(dot)com>
To: Roman Neuhauser <neuhauser(at)sigpipe(dot)cz>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: plphp: PHP Warning: Call-time pass-by-reference has been deprecated
Date: 2005-08-12 00:36:49
Message-ID: 20050812003649.44598.qmail@web52902.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Sure-

CREATE or REPLACE FUNCTION email_activated_member ()
RETURNS trigger AS $$

$new=$_TD['new'];
$old=$_TD['old'];

if(($_TD['event']=='INSERT' and $new['active']='t') or
($_TD['event']=='UPDATE' and $new['active']=='t' and
$old['active']=='f')) {
$link=$_TD['new'];

$sql="select *
from groups
where id=$link[group_id]";

$result=spi_exec_query($sql);

if($result) {
$group=spi_fetch_row($result);
}

if($group) {
$message=<<<EOT

Greetings...

Here are your link details:

Name: $link[name]
URL: $link[url]
Email: $link[email]
Contact Name: $link[contact_name]
Description: $link[description]

Thanks,
$group[name]
$group[url]

EOT;

if(!empty($link['email'])) {
$to=empty($link['contact_name']) ?
$link['email'] : "$link[contact_name] <$link[email]>";

mail($to,
"Link Activated - $group[name]!",
$message,
"From: {$group[name]} <$group[email]>\r\n");
}
}
}

$$ LANGUAGE 'plphpu';

-- CREATE TRIGGER email_activated_member AFTER INSERT
or UPDATE ON links FOR EACH ROW EXECUTE PROCEDURE
email_activated_member();

It justs lets people know when their link has been
activated.

CSN

--- Roman Neuhauser <neuhauser(at)sigpipe(dot)cz> wrote:

> # cool_screen_name90001(at)yahoo(dot)com / 2005-08-11
> 16:49:25 -0700:
> > I'm using PHP5, and I'm not passing by reference.
> My
> > first stop WAS plphp.commandprompt.com, but none
> of
> > their mailing list links for plphp work.
>
> Can you post the code that triggers the warning?
>
> --
> How many Vietnam vets does it take to screw in a
> light bulb?
> You don't know, man. You don't KNOW.
> Cause you weren't THERE.
> http://bash.org/?255991
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2005-08-12 00:41:56 Re: plphp: PHP Warning: Call-time pass-by-reference has
Previous Message Behzad Mahini 2005-08-12 00:27:49 Turning Off PotgrSQL Output Messages