I usually create the table in PHPMyAdmin and then export the structure. Copy that, remove the ending semi-colon, and put it inbetween
mysql_query(" and
");. Then to error check you can do something like this:
PHP Code:
if (mysql_query("...")) {
//Success
} else {
echo 'Error creating database table: '.mysql_errno().' :: '.mysql_error().'<br />';
}