Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 MySQL Syntax/Terms
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
JHanson90




PostPosted: Tue May 18, 2004 3:38 pm   Post subject: MySQL Syntax/Terms

I'm a little confused on some of then technical terms or syntax used between PHP and MySQL. I made a table, called it 'members,' and inside that table I put in name, age, sex, etc. Then I went to do mysql_query("insert into members values('testname','17','male')"). But then I got confused. When I do the "insert into" etc etc, am I inputting name, age, sex information with the 'testname', '17', 'male', or am I actually inputting those values directly into the table? So another way of asking this is: is the members part of "insert into members" the name of a table or the name of a value within that table?
Sponsor
Sponsor
Sponsor
sponsor
Amailer




PostPosted: Tue May 18, 2004 6:45 pm   Post subject: (No subject)

it's INSERT INTO TABLE_NAME (row_name, row_name2, row_name3) VALUES ($row_name, $row_name2, $row_name3) ;
octopi




PostPosted: Tue May 18, 2004 7:50 pm   Post subject: (No subject)

members would be the table name.

the values(x,y,z)

referrs to the different values your entering.
if you look at your table structure, it has a certain order.....it usually starts with an id feild.


an example table would be id, name, age
values('1','octopi', 17)

would put id=1, name=octopi, and age=17 as a new record (row) in the table.
JHanson90




PostPosted: Wed May 19, 2004 4:53 pm   Post subject: (No subject)

Thanks, I'll try that.
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: