5, September 2008

MySQL Table Creation? - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: MySQL Table Creation?
« previous next »
Pages: [1] Print

Author Topic: MySQL Table Creation?  (Read 306 times)
I crack Photoshop!
*
Gender: Male
Posts: 3
26 credits
Members referred : 0



« on: Jun 13, 2008, 01:16:07 PM »

Hi, I've had a good look through your site and can find plenty of examples of how to include the php class in our sites, but i can't find anything anywhere that shows how the initial SQL table should be laid out.

Can someone please let me know the SQL to create the table that is compatible with this script?

I'm guessing it's something close to this?:

CREATE TABLE `users` (
  `userID` int(4) unsigned NOT NULL auto_increment,
  `login` varchar(32) NOT NULL default '',
  `pass` varchar(32) NOT NULL default '',
  `email` varchar(40) NOT NULL default '',
  `active` int(1) NOT NULL default '0',
  PRIMARY KEY  (`userID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ;

Many Thanks  Grin
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8037
41179 credits
Members referred : 3



« Reply #1 on: Jun 14, 2008, 04:02:18 PM »

Using the class gives you the ability to create any table structure you want and then change the $tbFields array to meet your table structure.

To play with the default settings you just need the above SQL:

Code:
CREATE TABLE `users` (
  `userID` mediumint(8) unsigned NOT NULL auto_increment,
  `username` varchar(50) NOT NULL default '',
  `password` varchar(100) NOT NULL default '',
  `email` varchar(150) NOT NULL default '',
  `active` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`userID`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `email` (`email`),
  KEY `active` (`active`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7780
Tags : sql setup installation Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: MySQL Table Creation?
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Sep 05, 2008, 07:20:51 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 36.294
Total Topics: 7.477
Total Members: 3.899
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: speedy5044

30 Guests, 5 Users online :

14 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.