> -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 possib
uesday, June 10, 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 b
> -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',
> >
sday, June 10, 2003 11:42 AM
To: '[EMAIL PROTECTED]'
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 .= "U
x27;,
> > filter_code='$filter_code'";
I mean, the line breaks in the second example won't cause the query to bomb,
will they? I agree that using the $sql .= is cleaner, but the other way
isn't wrong, is it?
Rich
> -Original Message---
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')
Susan, try the following:
> > $sql = "UPDATE newdacs
> > SET emailfwd='$emailfwd',
> > mformat='$mformat',
> > filter_code='$filter_code'"; // close query string
> > if ($FUNC=='USERPOST') {
> >