Hey Guy's,anyone has a working codes of my problem?

moving row data table to another table using php/mysql

sorry guy's for this cause i'm very noob on this php/mysql language

any help would be appreciated(i'm reallly badly need your help)

Recommended Answers

All 6 Replies

You need to send a row of data from a mysql database to another?
Can you give an example of what are you tring to achieve so I can help you?

Member Avatar for diafol

From the member rules:

Do provide evidence of having done some work yourself if posting questions...

Show your code so far...

thank you dany12

i have a 2 table name is "original" table,then the second is "archieve" table..

i have 4 fields in the "original" table..

id_number (space) fullname (space) status (space) address

-001234 (space) romel barrio (space) student (space) california (space) (button link command)--> "move in archieve"

after i click the "move in archieve"

it should transfer the 001234,romel,student,california in the "archieve" table,,then also delete data from original table

that's all.

hope you understand..:}

Hi,

I found on the net the following syntax to copy rows from table1 to table2:

    INSERT INTO table2 SELECT col1, col2, col3  FROM table1 WHERE condition

Then, you can apply a DELETE command on table1 with the same condition.

Hi breakzzzz20, Its worked for me try this,

INSERT INTO trash_table (date, time, ip) SELECT t1.date, t1.time, t1.ip from messages t1 WHERE t1.id = '1';

DELETE FROM messages WHERE id = '1';

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.