Re: Re: Amount of data in the database

From: Date: Tue, 14 Jan 2003 13:49:04 +0000
Subject: Re: Re: Amount of data in the database
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-131544@lists.php.net to get a copy of this message
Thanks Lars. Sorry, then I have another question. How do I find the size of the record? Thanks Denis ----- Original Message ----- From: "Lars Olsson" <lasso@lassoweb.nu> To: "Denis L. Menezes" <menezesd@singnet.com.sg> Cc: "PHP general list" <php-general@lists.php.net> Sent: Tuesday, January 14, 2003 9:36 PM Subject: [PHP] Re: Amount of data in the database > A pretty easy way of doing it is to add a size field to the table. > Whenever you INSERT INTO or UPDATE the table, update this field to > contain the size of the data for the current record. Then, whenever you > need to check the amount of data for a particular user, just use this query: > > "SELECT SUM(size) FROM sometable WHERE user=someuser" > > Hope this helps > > > /Lars Olsson (lasso@lassoweb.nu) > > PS. Ive done this in a file upload script I created a while ago. If you > want, I can mail you the relevant bits and bytes. DS. > > > > Denis L. Menezes wrote: > > Hello friends. > > > > I have a need for checking how much data(in kb) exists of each of the user members in the MySQL so that when they upload more data I can restrict/warn them of the amount of data they have on the server at present. > > > > can anyone please tell me how to check the amount of data on the mysql for each record? > > > > thanks very much > > Denis > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#131544) next »