Hi..

This is my first time to create table in mysql database. I need the help to solve the mysql database problem. This is my first time to use mysql and I want to create a table called "login"

the command should be like the following:

create table login (
....

please tell me how to create the password field?? the following is sample:

create table login (
user_id int(4) unsigned zerofill not null,
user_pwd "...................................................................."
primary key(user_id)
);

please help me how to create column type of password

thank you..

joseph

    uhm, try the following query:

    create table login (
    user_id int(4) unsigned zerofill not null,
    user_pwd varchar(100) not null,
    primary key(user_id)
    );

    the password is now a varchar that is 100 long...

    but you won't really need the unsigned and zerofill stuff... it's not useful, especially not for a login.

    if you don't want to use it, do this query:

    create table login (
    user_id int not null,
    user_pwd varchar(100) not null,
    primary key(user_id)
    );

      Thank you so much for your solution. It's really help... o

      I got another problem.. I can get the whole row of data, how can I get one field data and make it as session??

      for example:
      table field --> logid, password

      then I want to get logid and make it as session and showing on the screen...

      thank you again...

        Write a Reply...