> > 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".
How does MySQL know which index I am looking up? My question seems to odd
so I have to assume that I am missing something important.
> You should probably also have a look at the REPLACE INTO command
> to see if this does what you need.
Yes, I believe it will but as I am used to programming with Non-SQL
databases, I am also used to replacing only those fields that I specify
within a record meaning everything but the index fields. I suppose I will
have to alter my mode of thinking...?
Thanks,
Don
---------------------------------------------------------------------
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