I would say something like the following would work better:
if($FUNC==USERPOST || $FUNC==MODU)
{
$sql .= UPDATE newdacs;
$sql .= SET emailfwd='$emailfwd',;
$sql .= mformat='$mformat',
$sql .= filter_code='$filter_code';
if($FUNC=='USERPOST')
agree that using the $sql .= is cleaner, but the other way
isn't wrong, is it?
Rich
-Original Message-
From: Matthew Moldvan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 11:33 AM
To: 'Susan Ator'; '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Is this query even possible?
I
]'
Subject: RE: [PHP-DB] Is this query even possible?
Yup, Matthew's right. I definitely forgot the other $sql. = that needs to go
in front of the WHERE clause.
Question for Matthew though:
Is this:
$sql .= UPDATE newdacs;
$sql .= SET emailfwd='$emailfwd',;
$sql .= mformat
-Original Message-
From: Susan Ator [mailto:[EMAIL PROTECTED]
Sent: 10 June 2003 16:18
This is what I am trying to do:
if ($FUNC==(USERPOST) || $FUNC==(MODU)) {
$sql = UPDATE newdacs
SET emailfwd='$emailfwd',
, 2003 11:50 AM
To: 'Hutchins, Richard'; '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Is this query even possible?
Keep in mind the code I sent is untested ... and I realized some errors
when I pasted it into a PHP page. Corrections are below.
As for the line breaks, I've used SQL formatted
-Original Message-
From: Matthew Moldvan [mailto:[EMAIL PROTECTED]
Sent: 10 June 2003 16:50
As for the line breaks, I've used SQL formatted that way before and it
hasn't cause me any problems.
It's a matter of preference, but I prefer to keep my query strings as lean as possible