]> git.mxchange.org Git - mailer.git/blobdiff - inc/pool-functions.php
Renamed function, used more "pool functions":
[mailer.git] / inc / pool-functions.php
index 81a303eea527037197153eebb00cb08ec5ab1cde..b183001d23e4c50a2e92dda1dced98d9d6f4ad6a 100644 (file)
@@ -126,5 +126,17 @@ function updatePoolDataById ($poolId, $columnName, $data, $updateMode = NULL, $w
        return (SQL_AFFECTEDROWS() == 1);
 }
 
+// Insert data into pool and return its insert id
+function insertDataIntoPool ($data) {
+       // Construct SQL query
+       $sql = 'INSERT INTO `{?_MYSQL_PREFIX?}_pool (`' . implode('`,`', array_map('SQL_ESCAPE', array_keys($data))) . "`) VALUES ('" . implode("','", array_values($data)) . "')";
+
+       // Run the query
+       SQL_QUERY($sql, __FUNCTION__, __LINE__);
+
+       // Return insert id
+       return SQL_INSERT_ID();
+}
+
 // [EOF]
 ?>