0

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)

6
Contributors
6
Replies
14
Views
5 Years
Discussion Span
Last Post by vibhaJ
0

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?

0

From the member rules:

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

Show your code so far...

0

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..:}

Edited by breakzzzz20: not understandable

1

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.

Edited by MarPlo

0

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';

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.