DJP1986 Posted March 24, 2008 Share Posted March 24, 2008 Hello, I am in the process of creating a download script, I am using a code to determine if someone is granted access or not to download the file. I want to set it up so they can only download, say, 250 MB a month worth of renders. And then, have the option for them to purchase an upgrade to their download limit, which will increase the limit for that user only. I want to use my vBulletin memberlist for this, so I already have a database with the users. I am a noob with MySQL though, and I am completely stumped. I tried this with PHP but failed. Does anyone know how to set this up? Quote Link to comment Share on other sites More sharing options...
aschk Posted March 25, 2008 Share Posted March 25, 2008 You need to store a limitation and usage related to the user. So you can either create a new table to link the 2 (as in a limits table and users table) or you can alter the original users table and add in 2 new columns. Up to you really. You'll also want to add the total filesize to the "usage" when you serve a file to the user. Incidently I would recommend separating the tables because who knows what vbulletin updates might do to your table layout, whether it completely formats the table and reloads the data or b0rks because of unknown columns. Quote Link to comment Share on other sites More sharing options...
DJP1986 Posted March 25, 2008 Author Share Posted March 25, 2008 Thank you for the tip! Would you happen to know of a tutorial or article that teaches or shows someone how to go about doing this? I am just getting started with MySQL, so I don't really know what I'm doing yet. :'( Quote Link to comment Share on other sites More sharing options...
aschk Posted March 26, 2008 Share Posted March 26, 2008 Have a look at http://www.php-mysql-tutorial.com/php-mysql-upload.php. Hopefully this should kickstart you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.