Subject Re: [firebird-php] SELECT STAR
Author Lester Caine
Dariusz Zelichowski wrote:

> A little silly question at first sight, but I'm putting
> together a site (PHP/Firebird), and I have some very basic
> question:
> Let's say I have one table, containing two fields: ID,
> NAME, AGE. I need to fetch ALL field ONLY from this one
> table and nothing more from any other tables. Values for
> all fields need to be displayed.
> Are there any technical reasons in this particular case
> (speed, efficiency of FB's databse engine) of using:
> as opposed to just

Actually, you give a good example of why it's nice to use the names -
two fields --- ID, NAME, AGE
I make that three ;)

It depends on how you are accessing the data within PHP, but if a field
name gets changed in the database, * will access it without problems,
but the application complains. IF you use the field names, then the
SELECT will fail, and it's easier to find the problem. Speed wise there
is not a lot of difference, but good programming practice would be to
always use the names.

Lester Caine
L.S.Caine Electronic Services