PHP-MySQL-Class
PHP-MySQL-Class copied to clipboard
Insert if not exist value
Is there a function to INSERT rows when there is no, or UPDATE if exists, using one MySQL query?
I don't think one exists in the Class but for the SQL syntax check http://stackoverflow.com/a/6853256/1634384 and you can use that with ExecuteSQL within the class to execute it. Keep in mind that the input won't be sanitized so make sure to use mysql_real_escape_string().