Is it safe to do this?
| From: | JeRRy | Date: | Wed, 18 Feb 2004 04:44:03 +0000 |
| Subject: | Is it safe to do this? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32991@lists.php.net to get a copy of this message | ||
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