* Chuck "PUP" Payne
> I know the basic sql command is....
>
> DELETE FROM $table WHERE field 1 = "$value"
>
> But I don't know how to write the state for a second field. Can some one
> tell, but one field seem to give too much choose and would make it to easy
> to delete the wrong record.

I think this is what you are asking for:

DELETE FROM $table WHERE field1 = "$value" AND field2 = "$value2"

Very often you would want an unique key for your table, a so called PRIMARY
KEY. In general, using the primary key is the safest and fastest way to
delete one and only one record.

--
Roger
query


---------------------------------------------------------------------
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

Reply via email to