PDA

View Full Version : simple data warehousing


rossbruniges
05-04-2005, 11:20 AM
I'm not sure whether this is the correct forum for this but I'm kinda stuck at how to move a data-row from one table to another using php, mysql

I have an events database which uses a cronjob to delete events whose end date has passed - but I have now been asked to move the event to a archieve table before deleting it from the current events table...

can anyone point me in the right direction or to any good example of this???

thanks for and help!

Ross

Tangerine Dream
05-04-2005, 02:07 PM
I'm not sure whether this is the correct forum for this but I'm kinda stuck at how to move a data-row from one table to another using php, mysql
Check 13.1.4.1. INSERT ... SELECT Syntax (http://dev.mysql.com/doc/mysql/en/insert-select.html). Particular SQL query depends on what columns do you want to use. Also check LXXIX. MySQL Functions (http://www.php.net/manual/en/ref.mysql.php) for mysql_connect, mysql_select_db, mysql_query, mysql_fetch_xxxx etc. MySQL related PHP functions

rossbruniges
05-04-2005, 02:09 PM
yeah - thats just what i need!

INSERT INTO and SELECT *

:D