Get the mysql table Row content and Inser it into the Same Table with PHP?

Here i have situation in my mysql table,i want get the particular row value and the same value i want to insert into another row in the same table.

Here the example

qualification Name Age id(pk)
BE            ragu 22 1
BE            ravi 33 2

I want To insert 2nd row again,the result must b like the following:

qualification Name Age id(pk)
BE            ragu 22 1
BE            ravi 33 2
BE            ravi 33 3

Suggest me some idea.... thanks in advance...


Use INSERT ... SELECT syntax for that

INSERT INTO Table1 (qualification, Name, Age, id)
SELECT qualification, Name, Age, 3
  FROM Table1
 WHERE id = 2

Here is SQLFiddle demo

Need Your Help

Random array value after return c++

c++ arrays pointers initialization

My problem is I don't know what happens with data that I put into my arrays and how to make them stay in array. While debugging it is clear that arr gets initialized with zeros and arr2 with {1,2,3}.

SQLite Group and Sort By Work Shift

java sql sqlite date datetime

I have a query that needs to perform a running sum based

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.