14, February 2012

MySQL Table Creation? - webmaster forum

 
Webdigity webmaster forums
[ 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
Instabuck - The easy way to sell digital products online

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



« on: Jun 13, 2008, 12: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: 5779
46271 credits
Members referred : 3



« Reply #1 on: Jun 14, 2008, 03: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 or twitter

Last blog : Butterfly Marketing 2.0
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....

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?
Feb 14, 2012, 06:01:32 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!






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