If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Multiple Where

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-08-04, 07:37
homchz homchz is offline
Registered User
 
Join Date: Jan 2004
Posts: 45
Multiple Where

This Update Works
-----------------------------------------------------------------
update sales_ter_email
set sales_email ="bristaino@yankeeequipment.com"
and sales_person ="Brendan Ristaino"
Where city = "arlington"
and state ="MA"
-----------------------------------------------------------------
This one does not
-----------------------------------------------------------------
update sales_ter_email
set sales_email ="bristaino@yankeeequipment.com"
and sales_person ="Brendan Ristaino"
Where city = "arlington"
and city = "ayer"
and state ="MA"
------------------------------------------------------------------

is what I am trying to do possible?
Reply With Quote
  #2 (permalink)  
Old 07-08-04, 07:56
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
there should be no problems doing the second if the first works properly.
Do you actually have a row that meets the criteria set out in the second update statement?
Reply With Quote
  #3 (permalink)  
Old 07-08-04, 08:18
homchz homchz is offline
Registered User
 
Join Date: Jan 2004
Posts: 45
Yes I have an ayer and an arlington row in the city column. But I just found out that my first is not updating but clearing the data, so no I am back to the beginning, again.
Reply With Quote
  #4 (permalink)  
Old 07-08-04, 14:00
homchz homchz is offline
Registered User
 
Join Date: Jan 2004
Posts: 45
got it, no "and" in the set funtion
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On