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
t;setembro de 2012 11:02 >Para: a...@ashleysheridan.co.uk >Cc: Ashickur Rahman Noor; PHP List >Assunto: Re: [PHP] Re: Need help to understand a code > >Op 22 sep. 2012 13:47 schreef "Ashley Sheridan" > het volgende: >> >> On Sat, 2012-09-22 at 17:43 +0600, A

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
] > $entity->$$key = $value; > >[...] > >And, of course, never ever use "*" in SQL queries. > >Samuel. > >-Mensagem original- >De: Matijn Woudt [mailto:tijn...@gmail.com] >Enviada em: sábado, 22 de setembro de 2012 11:02 >Para: a...@ashleysher

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

2012-09-22 Thread Samuel Lopes Grigolato
n SQL queries. Samuel. -Mensagem original- De: Matijn Woudt [mailto:tijn...@gmail.com] Enviada em: sábado, 22 de setembro de 2012 11:02 Para: a...@ashleysheridan.co.uk Cc: Ashickur Rahman Noor; PHP List Assunto: Re: [PHP] Re: Need help to understand a code Op 22 sep. 2012 13:47 schreef &qu

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

2012-09-22 Thread Matijn Woudt
Op 22 sep. 2012 13:47 schreef "Ashley Sheridan" het volgende: > > On Sat, 2012-09-22 at 17:43 +0600, Ashickur Rahman Noor wrote: > > > Hi Ashley > > > > I am updating some one code. Thanks for the notify. > > > > Thanks to all. Now I get that. > > --

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

2012-09-22 Thread Ashley Sheridan
On Sat, 2012-09-22 at 17:43 +0600, Ashickur Rahman Noor wrote: > Hi Ashley > > I am updating some one code. Thanks for the notify. > > Thanks to all. Now I get that. > -- > Dedicated Linux Forum in Bangladesh > 2048R/8

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

2012-09-22 Thread Ashickur Rahman Noor
Hi Ashley I am updating some one code. Thanks for the notify. Thanks to all. Now I get that. -- Dedicated Linux Forum in Bangladesh 2048R/89C932E1 Coordinator - Public Relation Cell, FOSS Banglades

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

2012-09-22 Thread Ashley Sheridan
On Sat, 2012-09-22 at 13:13 +0200, Maciek Sokolewicz wrote: > On 22-09-2012 12:34, Ashickur Rahman Noor wrote: > > Hi all > > > > I need some help to understand a code. The code is like this > > > > $result = mysql_query($sSQL) or die("err: " . mysql_error().$sSQL); > >> if($row = mysql_fetch

[PHP] Re: Need help to understand a code

2012-09-22 Thread Maciek Sokolewicz
On 22-09-2012 12:34, Ashickur Rahman Noor wrote: Hi all I need some help to understand a code. The code is like this $result = mysql_query($sSQL) or die("err: " . mysql_error().$sSQL); if($row = mysql_fetch_array($result)) { foreach($row as $key =>$value){