> Don wrote:
> >
> > > > Prior to updating, I want to search the table to see if my Key exists.
> > > > That way, I can add it or just update the associated fields. How do I
> > > > tell my script which Index file to use? I can't seem to find the
> > > > equivalent of the dBase style "Set Order to".
> > >
> > > Errr... If I understand your question correctly, you want to specify
> > > which index MySQL should use for looking up the values you need. You
> > > don't need to do that. MySQL takes care of using the correct indexes
> > > all by itself.
> >
> > This is what I suspected but I wanted to make sure. However, I'm curious as
> > to how MySQL does this in an efficient manner. The Docs state that I can
> > create, I believe, up to 16 indexes on a given table.
> >
> > Say I create 16 indexes on my table. One is a field I tagged as Primary
> > while the others are additional Indexes I created. Let's say that they are
> > all based on different Fields that happen to be all VARCHAR(10). Now I do a
> > search on a string,"12345678980".
>
> Search what?
>
> select * from customers where lastname="1234567890";
> will use an index that starts with lastname, if one exists.
The "light bulb" just went off in my head -)
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php