Re: Is it safe to do this?

From: Date: Wed, 18 Feb 2004 05:14:55 +0000
Subject: Re: Is it safe to do this?
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-32992@lists.php.net to get a copy of this message
That depends on what you're doing. Here's why I can't provide feedback: 1) Your code isn't at all complete, the foreach isn't even finished. 2) Where does the $addresses variable come from and what are you trying todo with it? 3) What is the mysql table and its columns supposed to represent? 4) What is this code supposed to accomplish? Jerry wrote:
Hi, Is it safe to do this: <snip>
    foreach ($addresses as $email) {
        $body = str_replace($email, $comp_uri, $body);
mysql_query ("update users SET email_setting='-1' WHERE email='$email'") or die ("Can't set email_setting"); mysql_query ("UPDATE users SET email_setting='-1' WHERE email_setting > -5") or die ("Unable "); </snip> Or would I be better to do this?: <snip>
    foreach ($addresses as $email) {
        $body = str_replace($email, $comp_uri, $body);
mysql_query ("update users SET emailerror='+1' WHERE email='$email'") or die ("Can't update email_setting"); mysql_query ("UPDATE users SET email_setting='-1' WHERE emailerror > 5") or die ("Unable "); </snip> Suggestions welcome. Jerry Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com
-- -- paperCrane <Justin Patrin>

« previous php.db (#32992) next »