RE: [PHP-DB] No data being put into the DB
| From: | Hutchins, Richard | Date: | Thu, 04 Mar 2004 13:18:08 +0000 |
| Subject: | RE: [PHP-DB] No data being put into the DB | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33296@lists.php.net to get a copy of this message | ||
Yeah, I prefer the ... '".$_POST["varname"]."' ... syntax primarily
because
of the way my editor (EditPlus) highlights the code. I tried the braces
syntax in EditPlus and it doesn't highlight the same way. I'll check out the
editors you guys (Jason and Jeffrey) use to see if I like them and maybe
I'll switch (especially if they're free :) ).
I'll admit, the whole quote-dot syntax thing is a bigger pain than the
braces syntax. But I'm not aware of any performance or security issues
related to the use of quote-dot notation. If there are any, I'd certainly
like to be made aware of them. However, I think it comes down to issues of
personal preference and the coding standards of your individual corporate
environment or client.
> -----Original Message-----
> From: Jason Wong [mailto:php-db@gremlins.biz]
> Sent: Wednesday, March 03, 2004 10:09 PM
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] No data being put into the DB
>
>
> On Thursday 04 March 2004 10:36, jeffrey_n_Dyke@Keane.com wrote:
>
> > >>IMO it is better to use the braces syntax:
> > >>"insert into show
> >
> > >>>>values('','{$_POST['Accnt_name']}','{$_POST['acc_num']}',
> > >>...)"
> >
> > I'm not second guessing at all, just curious as to why? Is
> it less work on
> > the parser?
> > Do you find it cleaner?
>
> Consistent - items in arrays are always referenced by $array['item'].
> Clean - no jumping in and out of double-quotes
>
> > I've often used Richard's method myself, for the
> > color coding that shows
> > in my editors(Ultraedit and VIM) when concatenating with .
> , mainly for
> > readability...but have found myself, of late, using the
> braces more...
>
> The braces syntax highlights fine on Quanta.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications
> Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-db
> ------------------------------------------
> /*
> Never go to bed mad. Stay up and fight.
> -- Phyllis Diller, "Phyllis Diller's Housekeeping Hints"
> */
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>