- addSql("INSERT INTO `{?_MYSQL_PREFIX?}_payments` (`time`,`payment`,`mail_title`,`price`) VALUES ('".postRequestElement('t_wait')."','".postRequestElement('payment')."','".postRequestElement('title')."','".postRequestElement('price')."')");
- if (countSumTotalData(postRequestElement('t_wait'), 'payments', 'id', 'time', true) == 1) {
- // Re-init the array here
- initSqls();
+ if (countSumTotalData(postRequestElement('t_wait'), 'payments', 'id', 'time', TRUE) == 0) {
+ addSql("INSERT INTO
+ `{?_MYSQL_PREFIX?}_payments`
+(
+ `time`,
+ `payment`,
+ `mail_title`,
+ `price`
+) VALUES (
+ '" . postRequestElement('t_wait') . "',
+ '" . postRequestElement('payment') . "',
+ '" . postRequestElement('title') . "',
+ '" . postRequestElement('price') . "'
+)");