RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Ford, Mike [LSS]
> -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

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Susan Ator
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

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Ford, Mike [LSS]
> -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', > >

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Matthew Moldvan
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

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Hutchins, Richard
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---

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Matthew Moldvan
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')

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Hutchins, Richard
Susan, try the following: > > $sql = "UPDATE newdacs > > SET emailfwd='$emailfwd', > > mformat='$mformat', > > filter_code='$filter_code'"; // close query string > > if ($FUNC=='USERPOST') { > >