// Add a new category
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_cats` WHERE cat='%s' LIMIT 1",
array(postRequestElement('catname')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Category does not exists, we simply add it...
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (cat, visible, sort) VALUES ('%s','%s','%s')",
array(postRequestElement('catname'), postRequestElement('visible'), bigintval(postRequestElement('parent') + 1)), __FILE__, __LINE__);