The query for making a normal record is like this:
$query = "INSERT INTO `{$TABLE_PREFIX}record` SET
title = '".mysql_escape( $_REQUEST['title'] )."',
content = '".mysql_escape( $_REQUEST['content'] )."',
dragSortOrder = '".time()."',
createdDate = NOW(),
updatedDate = NOW(),
createdByUserNum = '0',
updatedByUserNum = '0'";
mysql_query($query) or die("MySQL Error Creating Record:<br/>\n". htmlspecialchars(mysql_error()) . "\n");
$recordNum = mysql_insert_id();
This works flawlessly every time. If I change the table to point at my category table, on the other hand, nothing happens.
I've gone through the fields to make sure I'm not trying to INSERT the wrong data. There are no problems there.
However, I feel that perhaps Categories may need to have some default data set in the query - that's why it isn't working?
:0/
Perch