Re: General question about rotating growing tables

2002-12-04 Thread Qmail List
But there would be no way to variably create the newtable table name correct? Thx - Original Message - From: "gerald_clark" <[EMAIL PROTECTED]> To: "Qmail List" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, December 04, 2002 10:49

Re: General question about rotating growing tables

2002-12-04 Thread Qmail List
MySQL can do embedded SQL like that? I'm using 3.23. If so, can the embedded query have a WHERE clause as well (something like WHERE datetime > date_sub(NOW(), interval 1 month). Thx a lot - Original Message - From: "gerald_clark" <[EMAIL PROTECTED]> To: "

General question about rotating growing tables

2002-12-04 Thread Qmail List
Hello, I have a simple database schema with a table of log entries that grows quickly. Every month I'd like to break last month's entries off into a new table for that (last) month. I know creating new tables within an existing schema is not recommend database design, but in this case it seems to

date_sub, must use a datetime column type?

2002-10-28 Thread Qmail List
Hello List, Is it true that the date_sub function(s) will only work on datetime column types? SELECT count(id) as id FROM messages WHERE client_id = '2' AND datetime_col > date_sub(NOW(),interval 1 day) To get the above query to work, I had to change my datetime_col column from timestamp to date