forum

home / developersection / forums / php - mysql move records from table to other table

php - mysql move records from table to other table

Hank Greenberg 2899 09-Jul-2013
Hi Mindstickians,

I want to insert a record from first query i means the rows make then with seconds query to insert. can some one help me please

if ( isset($_GET['del']) ) {
    $id = $_GET['del'];
    $result = mysqli_query($con,"SELECT * FROM products WHERE id='$id'");
    while($row = mysqli_fetch_array($result))
    {
        echo $row['username'] . " " . $row['size'];
        echo "<br>";
    }
    $sql_move = mysqli_query($con,"INSERT INTO history (username, serial, image,   arrive,size)");
    $sql = mysqli_query($con,"DELETE FROM products WHERE id='$id'");
    echo "its deleted";
}
?>

Thanks in advance.

php php 
Updated on 09-Jul-2013
Can you answer this question?

Answer

1 Answers

Liked By