|
Posted by C. on 08/02/07 11:53
On 2 Aug, 10:04, Michael Fesser <neti...@gmx.de> wrote:
> >if so, can I simply return $row; ---because
> >'user_name' is the only field being selected.
>
> > $sql_query = "SELECT * from `user` WHERE (id = '$id')"; // (1)
>
> You shouldn't use "SELECT *" in production code, list all columns
> explicitly.
>
> Micha
You shouldn't use "SELECT *" in production code IF YOU CAN list all
columns
explicitly.
....reason being that you're loading more data into the mysql buffer
than you need, then it gets copied into the PHP variable space.
> (1), do I get some better performance theoretically?
Unless someone shoves a LOB column type and populates it, you're
unlikely to see much of a performance difference though.
C.
Navigation:
[Reply to this message]
|