pantichd wrote:
Figured it out.
The name of the table was "Person" instead of "person"...First letter was a
capital "P"

I didn't realize that the sql was case-sensitive.

It is with table names, field names and table aliases. Stuff like "SELECT", "INSERT", "UPDATE", "WHERE" isn't case sensitive (the sql keywords).

Also - if you want help, please post the problem code *exactly*.

You had three problems in the post that have nothing to do with this solution:

mysql_select_db ("<table>");

(Not really a problem but I highly doubt your database is called "<table>")

mysql_query("INSERT INTO person (FirstName, LastName, Age) VALUES('Jack',
'Bauer', '67')");

//Try to insert the record
if (!mysql_query($sql,$con))

$sql is not defined anywhere - this would produce a "query is empty" error.

and finally you were running the query twice. It's not a "problem" but it would be a hard-to-find-bug:

// Close the connection

If you post the exact code that's having the problem it makes it so much easier for everyone to help...

Postgresql & php tutorials

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to