Connecting Tech Pros Worldwide Help | Site Map
Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old September 9th, 2008, 01:21 PM
Newbie
 
Join Date: Jul 2008
Posts: 4
Default Multiple Data Update

Hi,

I want to update multiple row data on single click
Here is my code to update one row
sql="Update jobs SET instructions='"&instructions&"',date='"&date&" where job='"&job&"'"

Please help

Regards
Twin
Reply
  #2  
Old September 9th, 2008, 04:40 PM
shweta123's Avatar
Expert
 
Join Date: Nov 2006
Location: India,Pune
Posts: 664
Default

Hi,

To update multiple rows you should use IN operator in where condition. IN operator is used to match multiple records.
e.g
You have to make change in the sql query as follows :

sql="Update jobs SET instructions='"&instructions&"',date='"&date&" where job IN( '"&job&"'")

Here , job variable should contain the list of values to match.
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 204,687 network members.
Post your question now . . .
It's fast and it's free

Popular Articles