Results 1 to 7 of 7

Thread: relate two tables

Threaded View

  1. #1
    Join Date
    Jul 2003
    Posts
    421

    relate two tables

    hi all I have two tables;
    table student (
    UserId int Not null auto_increment ,
    UniversityN varchar(10) Not null,
    AstComposition varchar(3) Null,
    BstComposition varchar(3) default null,
    ......)
    table ApplyStatus(
    UserId int Not null ,
    UniversityN varchar(10) Not null,
    UserIp varchar(45) Not Null,
    AccessTime varchar(45) Not Null,
    PRIMARY KEY (UserId),
    FOREIGN Key(UserId) REFERENCES student(UserId) on Delete
    Cascade on update cascade)Type=InnoDB DEFAULT CHARSET=utf8;
    I want to use setAutocommit( false) to update this two table on the same time, and I relize I make a mistake , how to get my userId on the second table
    ________
    ACURA CL HISTORY
    Last edited by sql; 03-06-2011 at 02:07 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •