•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 397,720 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,559 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 249 | Replies: 2
![]() |
•
•
Join Date: Jul 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Is there anyway to have (in one query) two separate queries? For example if query one fails then it will not affect the rest of it. Example code:
Say that the lastLogin table does not exist:
UPDATE userInfo SET lastLogin=3 WHERE id=5
UPDATE userInfo SET LastLogin=3 WHERE id=5
Is there anyway to get the second line to execute (in a single query) even though the first line would cause an error?
Say that the lastLogin table does not exist:
UPDATE userInfo SET lastLogin=3 WHERE id=5
UPDATE userInfo SET LastLogin=3 WHERE id=5
Is there anyway to get the second line to execute (in a single query) even though the first line would cause an error?
•
•
Join Date: Jun 2008
Posts: 38
Reputation:
Rep Power: 1
Solved Threads: 5
How will you run 2 separate queries in a single query
UPDATE userInfo SET lastLogin=3 WHERE id=5
UPDATE userInfo SET LastLogin=3 WHERE id=5
These are 2 update statements.if you want to run them in a sequence put SEMI COLAN at the end(
that way even the first fails the rest will execute
UPDATE userInfo SET lastLogin=3 WHERE id=5
UPDATE userInfo SET LastLogin=3 WHERE id=5
These are 2 update statements.if you want to run them in a sequence put SEMI COLAN at the end(
that way even the first fails the rest will execute ![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
Similar Threads
- Removing Query Strings (ASP.NET)
- Double MySQL Query (PHP)
- Dynamic Query (JSP)
- MySQL nested query / joined query conversion help (MySQL)
- problem with lengthy query (Java)
- Retreiving variables from a sql query into a form (PHP)
- Sql Query (VB.NET)
- Query Building (Database Design)
Other Threads in the MySQL Forum
- Previous Thread: port 3306 being used
- Next Thread: How to find a stored procedure


Linear Mode