0

Hello, I'm building a site that allows users to post comments like facebook. After say, 10 rows ( or 10 INSERT INTO's )I want the 1st row to be deleted as to control space in the data base. Any key words or links would help.
Thanks

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by phpDave
0

Yes, thank you.
I do have an ORDER BY but my concern was having too much in the data base. I have been working with this for a year now but still more to learn. Is this a valid concern? If so, how should this be controlled?

0

Got it.

if (mysql_num_rows >10) {
	$deleteRow = mysql_query("DELETE FROM table WHERE user_id = var ORDER BY id LIMIT 1");
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.