RES: RES: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Samuel Lopes Grigolato
setembro de 2012 12:35 Para: Samuel Lopes Grigolato Cc: 'PHP List' Assunto: Re: RES: RES: [PHP] Re: Need help to understand a code On Sat, 2012-09-22 at 12:12 -0300, Samuel Lopes Grigolato wrote: I disagree with you Ashley, some arguments can be found here: http://sqlblog.com/blogs/aaro

Re: RES: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Ashley Sheridan
ridan.co.uk] > Enviada em: sábado, 22 de setembro de 2012 11:52 > Para: Samuel Lopes Grigolato; 'PHP List' > Assunto: Re: RES: [PHP] Re: Need help to understand a code > > > > Samuel Lopes Grigolato wrote: > > >+1 to bad maintainability

RES: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Samuel Lopes Grigolato
: RES: [PHP] Re: Need help to understand a code Samuel Lopes Grigolato wrote: >+1 to bad maintainability of the code. > >As a suggestion, one better solution could be something like: > >[...] > >class Entity { > public $id; > public $name; >} > >[...] &

Re: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Maciek Sokolewicz
On 22-09-2012 16:19, Samuel Lopes Grigolato wrote: +1 to bad maintainability of the code. As a suggestion, one better solution could be something like: [...] class Entity { public $id; public $name; } [...] $entity = new Entity(); foreach [...] $entity->$$key = $value; [...] And

Re: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Ashley Sheridan
Samuel Lopes Grigolato wrote: >+1 to bad maintainability of the code. > >As a suggestion, one better solution could be something like: > >[...] > >class Entity { > public $id; > public $name; >} > >[...] > >$entity = new Entity(); >foreach [...] > $entity->$$key = $value; > >[...] > >And,

RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Samuel Lopes Grigolato
+1 to bad maintainability of the code. As a suggestion, one better solution could be something like: [...] class Entity { public $id; public $name; } [...] $entity = new Entity(); foreach [...] $entity->$$key = $value; [...] And, of course, never ever use "*" in SQL queries. Samue