[eluser]obiron2[/eluser]
you basically have three choices.
1) Add an account ID to every table and use it in your select queries. This is fine if you have built it in from the start but can be a right pain if you are trying to retro-fit it. Also, if you are allowing external applications (e.g. report writers such as Crystal Reports) access to the data it is obviously not secure.
2) use a separate database for each account, but this will require some PITA maintenance to run patches and upgrades. The advantage is that each database can have different user accounts and is therefore secure
3) a halfway house where you prefix the data tables with the account ID but keep it all within one database. E.g.
XX_Thread and YY_Thread are both the same data structure but for different users. To generate queries you would need to convert queries from looking at _Thread to their relevant account ID, probably using something along the lines of
"SELECT * from ".$accountID."_Thread"
You can then run upgrades on all the tables with similar names using a script and the data is (relatively) secure because you only get one accounts data in any tables (plus you don't overuse your database allowance on your ISP...)
Obiron