Thank you John.

-----Original Message-----
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2003 12:10 PM
To: Christopher McCourt; PHP Lists
Subject: Re: [PHP-DB] Having trouble with this SQL query

> 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
> 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.
an issue in your case, though, since you're not inserting any variables
the SQL.)

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)
call and have error checking built into the function and handle all
the same.

---John Holmes...

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to