> First of all, I'm a newbie to PHP and MYSQL and started working on a
> create table query in PHP to execute on MYSQL. Can someone take a quick
> look at the following code to see if there are any problems? Can you
> also advise some tips on debugging?
Print out your SQL queries when debugging. Make sure they look correct. (Not
an issue in your case, though, since you're not inserting any variables into
Also, use mysql_error() in conjunction with mysql_query().
$rs = msyql_query($sql) or die(mysql_error());
or example. Wrapping your sql queries in a simple abstraction layer will
make debugging easier, too. You could use a simple db_query($sql) function
call and have error checking built into the function and handle all queries
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php