View Single Post
  #6 (permalink)  
Old 08-04-2007, 02:52 AM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 440
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
It doesn't show up b/c the error is in your mysql_query statement, not in the connection. After each mysql_xxx() statement, you should check for an error. or die(); isn't a very friendly check either.

Try replacing the create table with this:
Code:
CREATE TABLE `mycms` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `username` varchar(10) NOT NULL,
  `password` varchar(10) NOT NULL,
  PRIMARY KEY  (`id`)
)

Also, take note that I have made the primary key primary and unsigned. These are good things for almost every primary key.

So, how did I get this code to generate the table? I created the table in phpmyadmin and then chose export the table structure - all the code perfectly generated for me with virtually no effort.

OK. Time for me to finally go to bed. gl!

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!