[thelist] SQL Query Review

Randal Rust randalrust at gmail.com
Tue Apr 22 12:22:42 CDT 2008

On Tue, Apr 22, 2008 at 1:13 PM, r937 <rudy at r937.com> wrote:

>  no, do not declare indexes for PKs, just for FKs, as well as for any
>  non-PK/FK columns used in a WHERE condition


>  >   $entryTitle=$rs->fields[1];
>  i don't do php, but i think you're leaving yourself open for disaster if you
>  ever change the sequence of the columns in the SELECT clause

ok, i see what you are saying. and yes, i would tend to agree with
you, but if i change the order of the select, then i always make sure
to run it though the test environment first. this ensures that
something like that doesn't happen.

>  >>      FROM entries AS e
>  >
>  > ....but that threw me for a loop. What will that do for me?
>  it will give the alias "e" to the entries table

ok. thanks, rudy. as always, very helpful.

Randal Rust
R.Squared Communications

More information about the thelist mailing list