Limit MySql table size

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Clarkent
Forum Newbie
Posts: 6
Joined: Sat Jan 01, 2005 8:29 am

Limit MySql table size

Post by Clarkent »

It's possible to limit (by PHP code) the size of a table ? E.g. My table users cannot contain more than 10 Mbyte.
It is possible to insert a little PHP script that verify the table (users) size and allows or not other INSERT ?

Thanks

Sory for my english
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

well.. here's how phpMyAdmin does it:

Code: Select all

SHOW TABLE STATUS LIKE 'table_name'
it then combines the data_length and index_length fields for the byte size used.
Post Reply