General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 25th, 2003, 02:18 AM
zigote zigote is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Atlanta GA
Posts: 73 zigote User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 11 sec
Reputation Power: 7
Moving data from 1 table to another

I will try to explain this the best that I can.

I would like to move my news to archives, then delete the old article from the news table.
I have 2 mysql tables, 1 contains news [id, date, content,] the other is just the same but name archives.

I list the news in a admin section, Next to each news ID there's a URL, [ move.php?=$id ]
If I choose that news ID, it would then be moved to the archives table and then be deleted from the regular news table.

I have no idea where to start on doing this, Please Help :-)

Reply With Quote
  #2  
Old March 27th, 2003, 12:10 AM
perfectphp perfectphp is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 3 perfectphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Why not just add another column to the current news table, entitled "archive".

Put in '1' if it's archived, and '0' if it isn't. (Set default of 'archive' to '0'). When viewing current news, just do a "SELECT * FROM `news` WHERE `archive` = '0'", and you should get your desired results.

Reply With Quote
  #3  
Old March 27th, 2003, 11:36 AM
zigote zigote is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Atlanta GA
Posts: 73 zigote User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 11 sec
Reputation Power: 7
I didn't think about that, Thanks

Instead of moving the data just edit it to another category...


Thanks again :-)

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Moving data from 1 table to another


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT