X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-add_rallye.php;h=12798e889970eb523980b60d6f0bc647a8e8ec23;hb=77cdaff2afb97ed32985ced906a3a95ee078c2ef;hp=d0ffeb91690c2476e8e196412d003ce17dae4a39;hpb=f9a9c09e1ae257449bfd98f8854e321efba1dc3c;p=mailer.git diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index d0ffeb9169..12798e8899 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -47,13 +47,13 @@ if (isset($_POST['ok'])) $END = mktime($_POST['end_hour'] , $_POST['end_min'] , $_POST['end_sec'] , $_POST['end_month'] , $_POST['end_day'] , $_POST['end_year'] ); // Is there already a rallye running? - $result = SQL_QUERY_ESC("SELECT id, admin_id FROM "._MYSQL_PREFIX."_rallye_data WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id, admin_id FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1", array($START, $START, $START, $END), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Ok, start and end time did not overlap - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_data (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify) + SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_data` (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')", array( GET_CURRENT_ADMIN_ID(), @@ -68,7 +68,7 @@ VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')", ), __FILE__, __LINE__); // Load ID - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_data WHERE start_time='%s' AND end_time='%s' AND title='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE start_time='%s' AND end_time='%s' AND `title`='%s' LIMIT 1", array($START, $END, $_POST['title']), __FILE__, __LINE__); list($id) = SQL_FETCHROW($result); SQL_FREERESULT($result);