Hello, I have a problem in an Apache module which connects to MySQL using C API for counting banner views and clicks. This module creates a report table for each day. This table is called report_YYYYMMDD, where YYYYMMDD is the current day. To keep thing simple I just make following query first:
CREATE TABLE IF NOT EXISTS report_YYYYMMDD (PRIMARY KEY (banner_id)) SELECT id as banner_id,0 as clicks, 0 as views from banners. This means that a new table is created after the first HTTP request after midnight. In all other cases this query should be ignored by MySQL server. Right after that this table is updated: UPDATE report_YYYYMMDD set clicks=clicks+1 WHERE banner_id=XXX or: UPDATE report_YYYYMMDD set views=views+1 WHERE banner_id=XXX Well, funny things are happening here. After the first request the table is created and everything is fine. But when the next one comes the table is deleted! MySQL Log file says nothing. Can somone tell me what's going on? MySQL Version is 3.23.49 and runs on a Linux system (compiled from sources). Thanks -- Robert Vetter Internet Application Developer Kontor23 GmbH Ottenser Hauptstrasse 56-62 22765 Hamburg Tel.: 040/380893-14 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php