Posted by Angelos on 10/05/29 11:16
Hello,
First of all sorry if this is not the correct newsgroup for this question,
but I am using PHP with MYSQL and someone here could have an answer and the
experience.
I have the a table (content) with some content and every time I edit it I
store all the table contents in an other table (content_bak) when I want to
restore the contents
How am i going to do that ? I am trying to do :
REPLACE INTO content SELECT bak_content_id, bak_content_title FROM
content_bak WHERE backup_id = '".$_GET['buckup_id']."'";
TABLE CONTENT
content_id int PK
content_title varchar
TABLE CONTENT_BAK
backup_id int PK
bak_content_id int
bak_content_title varchar
What I want to do is to REPLACE the TABLE CONTENT content_id = $x with
the TABLE CONTENT backup_id = $y AND bak_content_id =$x
Any ideas ?
[Back to original message]
|