In this Php Tutorial we will see How To Insert Update Delete Search Data In MySQL Database Table From html From Using Php I Use In This Tutorial: - NetBeans IDE. Basic insert, view, edit, delete and update using PHP and Mysql Hi readers, today i going to post one of old topic in php and mysql, here i'm going to post Insert data through form, and fetch / view the data from database, and also Edit, Delete and Update with detailed explanation.
Active8 years, 10 months ago
i need in one query use select, insert, delete and update.
(I need copy data from old table in to new, then delete old, and update another).
Insert and select (copy function I was able to, but now i have problem)
Database Insert Update And Delete Method
I have this query:
Thanks
user319854user319854![Mysql Mysql](/uploads/1/2/6/0/126020231/732947013.jpg)
1,6351010 gold badges3535 silver badges4343 bronze badges
4 Answers
You can't do it all in one query, but you can do it all in one transaction if you are using a transactional store engine (like InnoDB). This might be what you want, but it's hard to tell only using the information you provided in your question.
Ike WalkerIke Walker51.7k1313 gold badges8585 silver badges9494 bronze badges
MySQL
does not support MERGE
, so you'll have to do it in two queries:, provided you have
PRIMARY KEY (id)
in both tables.Insert Update And Delete Video In Hindi
QuassnoiQuassnoi345k7373 gold badges542542 silver badges567567 bronze badges
In one query i dont think its possible.
You can try writing a Stored Procedure and using Triggers you may achieve that
zodzod7,9862222 gold badges5959 silver badges9999 bronze badges
You can't combine Select/Update/etc into one query. You will have to write separate queries for each operation you intend to complete.
pinkfloydx33pinkfloydx334,34733 gold badges2727 silver badges4545 bronze badges