Re: [PHP] clear a mysql table

2008-10-28 Thread Lupus Michaelis
Jim Lucas a écrit : I would ass-u-me that if someone had foreign keys and/or triggers setup that they would not need to ask how to clear/empty a table I never assume that kind of thing, because he could be cleaning a database he didn't designed. It happends. :) -- Mickaël Wolff aka Lupus M

Re: [PHP] clear a mysql table

2008-10-28 Thread Jim Lucas
Lupus Michaelis wrote: > Daniel P. Brown a écrit : >> In direct response to your question, you're looking for the >> TRUNCATE command. > > I hope he doesn't have any foreign keys nor triggers. > I would ass-u-me that if someone had foreign keys and/or triggers setup that they would not nee

Re: [PHP] clear a mysql table

2008-10-28 Thread Lupus Michaelis
Daniel P. Brown a écrit : In direct response to your question, you're looking for the TRUNCATE command. I hope he doesn't have any foreign keys nor triggers. -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] clear a mysql table

2008-10-26 Thread Bastien Koert
> > > truncate cash; > Hey, my wife does that all the time! -- Bastien Cat, the other other white meat

Re: [PHP] clear a mysql table

2008-10-26 Thread Chris
Ronald Wiplinger (Lists) wrote: I need to clear a table (cache) from a database based on the database size. Our web site uses cached pages. Our webhost only allow us 100 MB storage. Usually the database is just 10 MB, but when a search engine crawls our calendar, then the storage is quickly 108

Re: [PHP] clear a mysql table

2008-10-26 Thread Ashley Sheridan
On Sat, 2008-10-25 at 20:47 -0500, Micah Gersten wrote: > > Ronald Wiplinger (Lists) wrote: > > I need to clear a table (cache) from a database based on the database size. > > > > Our web site uses cached pages. Our webhost only allow us 100 MB > > storage. Usually the database is just 10 MB, but

Re: [PHP] clear a mysql table

2008-10-25 Thread Micah Gersten
Ronald Wiplinger (Lists) wrote: > I need to clear a table (cache) from a database based on the database size. > > Our web site uses cached pages. Our webhost only allow us 100 MB > storage. Usually the database is just 10 MB, but when a search engine > crawls our calendar, then the storage is qui

Re: [PHP] clear a mysql table

2008-10-25 Thread Yeti
I used to have a similar problem What I did was to define a max number of cashed pages. So when reaching that number I simply did it the FIFO way -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] clear a mysql table

2008-10-25 Thread Daniel P. Brown
On Sat, Oct 25, 2008 at 11:02 AM, Ronald Wiplinger (Lists) <[EMAIL PROTECTED]> wrote: > > I plan therefore a web page, which is triggered by cron every hour and > will just clear the table. > > Can I use just: > mysql_query("DELETE FROM cash") > or die(mysql_error()); Please remember that GOOG

Re: [PHP] clear a mysql table

2008-10-25 Thread Richard Heyes
> or is there a better solution? Yes, look for a better hosting firm. 100Mb is paltry these days. -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (Updated October 25th) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.

Re: [PHP] clear a mysql table

2008-10-25 Thread tedd
At 11:02 PM +0800 10/25/08, Ronald Wiplinger (Lists) wrote: Can I use just: mysql_query("DELETE FROM cash") or die(mysql_error()); If you need to delete some cash, please look in my direction. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com

[PHP] clear a mysql table

2008-10-25 Thread Ronald Wiplinger (Lists)
I need to clear a table (cache) from a database based on the database size. Our web site uses cached pages. Our webhost only allow us 100 MB storage. Usually the database is just 10 MB, but when a search engine crawls our calendar, then the storage is quickly 108 MB. The system reports then mathem