|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
I am kind of new to MySQL. My question is, where do I put the Create Database and Create Table code???
IE. CREATE TABLE posts ( ID int(5) DEFAULT '0' NOT NULL auto_increment, TopicID int(5) DEFAULT '0' NOT NULL, Name varchar(50) NOT NULL, Email varchar(50) NOT NULL, Password varchar(50) NOT NULL, TimeStamp varchar(10) NOT NULL, Post text NOT NULL, PRIMARY KEY (ID) ); CREATE TABLE topics ( ID int(5) DEFAULT '0' NOT NULL auto_increment, TopicName varchar(50) NOT NULL, PRIMARY KEY (ID) ); Do I type this in the page where the database is called? ------------------ Hartmann |
|
#2
|
|||
|
|||
|
Hello Hartman,
Judging from the code you have written you have defined your database and 2 tables. The coded that you will generate when you input data and extract data from these tables can be placed any where eg. embedded into html files etc. Read some articles on this website - thats how I have been learning. Good luck! Richard |
|
#3
|
|||
|
|||
|
Sorry reading your post again has shed your angle. Table data is stored on your server that has PHP and Mysql installed. I use a PHP administration software that allows me to update tables etc.
Richard |
|
#4
|
||||
|
||||
|
Let me clarify.....
Would the code above be placed in a regular PHP file after created the Database? |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Create table... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|