The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > Web Programming > Database


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags: , , ,

Reply
 
LinkBack Thread Tools    Display Modes   
  #1 (permalink)  
Old 06-15-2007, 10:13 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,111
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
Understanding mySQL Table

I'm now playing around with myPhpAdmin, see if anybody can help me here

PHP Code:
CREATE TABLE `memberinfo` (
`
usernameVARCHARNOT NULL ,
`
passwordVARCHARNOT NULL 
ENGINE MYISAM 
ok there are several things that I don't understand from that line, I understand, usename, memberinfo, password, vachar(4). I don't understand the rest of it

Can anybody explain me? How do you use these information? I guess I would need to understand the basics of SQL so that I can use it for my portal page.. thx guys

__________________

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!
Reply With Quote
  #2 (permalink)  
Old 06-15-2007, 12:02 PM
Lee's Avatar
Lee Lee is offline
PT Staff*
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: Blackpool, UK
Posts: 616
iTrader: (0)
Lee will become famous soon enoughLee will become famous soon enoughLee will become famous soon enoughLee will become famous soon enough
maybe these links can help you:
Varchar
MYISAM
Null

__________________

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!
Reply With Quote
  #3 (permalink)  
Old 06-15-2007, 05:57 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,111
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
Quote:
Originally Posted by Lee View Post
maybe these links can help you:
Varchar
MYISAM
Null
I understood what's varchar is, I just need to understand on how does this thing work. I'm trying to set the username, and the value for that username.

__________________

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!

Last edited by HelloWorld : 06-15-2007 at 06:01 PM.
Reply With Quote
  #4 (permalink)  
Old 06-15-2007, 06:59 PM
Nutter Nutter is offline
Novice
Join Date: Jun 2007
Posts: 22
iTrader: (0)
Nutter is on a distinguished road
It sounds like you're looking at two different types of queries. The one you quoted is the query that actually builds the table. If you're trying to insert a user into this table you need an INSERT query, or if you're updating then an UPDATE query.

Code:
INSERT INTO memberinfo (username, password) VALUES ('John', 'pass');
You're probably going to want to make the fields longer than 4 characters.

__________________
- Ryan
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!
Reply With Quote
  #5 (permalink)  
Old 06-15-2007, 07:02 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,111
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
Quote:
Originally Posted by Nutter View Post
It sounds like you're looking at two different types of queries. The one you quoted is the query that actually builds the table. If you're trying to insert a user into this table you need an INSERT query, or if you're updating then an UPDATE query.

Code:
INSERT INTO memberinfo (username, password) VALUES ('John', 'pass');
You're probably going to want to make the fields longer than 4 characters.
Tell me if I'm not wrong, and we can control these from PHP too, right? thx, rep added

__________________

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!
Reply With Quote
  #6 (permalink)  
Old 06-15-2007, 11:43 PM
chrishirst chrishirst is offline
Jr. Programmer
Join Date: Jun 2007
Location: Blackpool UK
Posts: 87
iTrader: (0)
chrishirst will become famous soon enoughchrishirst will become famous soon enough
Quote:
Tell me if I'm not wrong, and we can control these from PHP too
Depends on how you mean "control"

In most server side languages you can build queries, send them to the server and retrieve the results.

Start with learning the Basic SQL Commands

__________________
Chris
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
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!
Reply With Quote
  #7 (permalink)  
Old 06-16-2007, 12:00 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,111
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
Quote:
Originally Posted by chrishirst View Post
Depends on how you mean "control"

In most server side languages you can build queries, send them to the server and retrieve the results.

Start with learning the Basic SQL Commands
Thanx, it helps me a lot. I'm now able to insert values to my data table. Now I just need to be able to call it into my PHP rep added..

__________________

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!
Reply With Quote
Reply


Thread Tools
Display Modes

   Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 12:54 PM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50