PDA

View Full Version : Creating tables with mysql



Weblife
July 30th, 2002, 23:22
ok well i was making a website for the band im in, and i wanted to have a mailing list.. so i created the table with the mysql app console (c:\mysql\bin\mysql.exe)

so i opened that program, having mysqld running, and i started my database with

Create database list;

then

use list

then i created my table i entered:

Create Table list(
name varchar(20),
last varchar(20),
email text
);

and it said, ok, 0 rows effected, and its in the data

but when i go to get data out of my database.. it tells me that its an invalid result.. this happened to me a long time ago.. and what it was that there was no table called list...

but its in my data

this is exactly what i did... i think i might be missing some parts of how to create tables if it tells me theres no table named list..

please help me, im running on windows ME

thanks in advance..

GregT
July 31st, 2002, 00:38
Try this

CREATE TABLE list (
name varchar(20) NOT NULL default '',
last varchar(20) NOT NULL default '',
email text NOT NULL
) TYPE=MyISAM;

that should work.

Weblife
July 31st, 2002, 08:08
thank you, but i have some experience, what does TYPE=MyISAM;

do?

never saw that before

GregT
July 31st, 2002, 18:35
It specifys the type of table.
If you want me to find exactly what it means I can check, Im no expert I just know that mySQL requires the type line to make a table.

Weblife
July 31st, 2002, 21:35
thats np u dont have to check... i was just curious