hello..i kind of beginner in mysql and php coding..n i got the question about the Foreign key of Mysql database MyIsam.
I know that MyIsam cannot support foreign keys excpet u r using Innodb..ok
here is my problem..let say i got this two table in my database
create table customer (
cust_id int(10) not null primary key auto_increment,
name char(20) not null)
type = MyISAM;
create table order (
order_id int(10) not null primary key auto_increment,
cust_id int(10) not null,
order_name char(10) not null)
type = MyISAM;
i can insert my data automatically like this
insert into customer values ('1, 'abc');
insert into order(1, 1);
but i dun want to do like that when i want the user enter the details, it makes
sense rite, we dun ask customer to enter their cust_id in the order table(cause i know that cust_id in customer table will auto_increment so i can put it null to the cust_id in customer table but i stuck in the order table)..
"some ppl suggest me to use last_index_id()"..n how the table are going to connected if there r not link..any suggestion or tips for this pro..if i dun make u guys clear please ask me to repost again..thanks..