View Full Version : Scripting Questions


BlueDragon1981
08-14-2007, 01:00 AM
With all the wonderful things going on in my life right now (note the sarcasm there) I have not had time to do the redesign of my sites and forum. However before I even get into that I want to make it so if people log on to my forum they can also log onto my other websites. Not all areas are going to have logon's but certain information may. I am certain I can use one sql database for this but I am not certain how to do such a thing. So do you know of the best way for the code to look up members names in a database. I'm thinking it would be the forum database. I also would like them to be able to register from all the sites and have it placed in the forum database. Kind of like if they register on any of the sites it works for all of them.

Also do you know of any way for a script to take out tables from one database and place them in another database. I'm trying to also think of a good way to archive the forums old files. While searching around I have come to the conclusion that many of the good archives have a lot of scripting and programming behind them.

Let me know of anything when you can. Like I said I really don't have time for much right now but I would like to get an idea of what is going to have to go into my redesign.

Andrew Green
08-14-2007, 01:27 AM
Basically you just need to find the code that the forum uses to detect users (check sessions / cookies) and include it on other pages.

as far as backing up goes:
mysqldump db_name > backup-file.sql
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html

BlueDragon1981
08-14-2007, 02:53 AM
Thanks for the great resource. I will be sure to bookmark that. I didn't get a chance to look into it, just glanced for now but does that remove the tables? I want to simply write something just for admin that can do that but simply from a link dump it into an archive and remove items that is a certain age. Maybe even set it up to run automatically for a certain time of day. (that way large cleanups won't be hogging memory say if I run it once every two months)

Andrew Green
08-14-2007, 11:22 PM
Doesn't delete anything, just dumps the contents of the database into a file.

BlueDragon1981
08-18-2007, 02:16 AM
So my script would have to dump the files of a certain age first then I would have to have it after that remove the information with something else. Can that be done with one script or do you think i will have to dump it first then go through and delete them?