hai, i have change with : my ($nik, $password, $scode) = @_;
when i execute the scripts, the scripts can't execute and the error of scripts is : DBD::mysql::st execute failed: Column 'nik' cannot be null at insert_sql.pl line 36, <> line 1. Unable to execute query: DBI::db=HASH(0x1ca3284)->errstr i used mysql 3.23.54 on machine 1 and mysql 4.0.17 on machine 2, i try on machine 1 and 2 and still error. before i create that scripts first i create the table with this command on mysql shell. mysql> create table user (nik varchar(8) NOT NULL, password varchar(8) NOT NULL, scode varchar(8) NOT NULL, PRIMARY KEY (nik)); and the structure of table is : mysql> describe user; +----------+------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+------------+------+-----+---------+-------+ | nik | varchar(8) | | PRI | | | | password | varchar(8) | | | | | | scode | varchar(8) | | | | | +----------+------------+------+-----+---------+-------+ I have tried every way possible I can think of and I cannot get it to work at all. Any help with this would be greatly appreciated. regards, hendra kusnandar --- Waldemar Zurowski <[EMAIL PROTECTED]> wrote: > W li¶cie z sob, 13-03-2004, godz. 16:23, Hendra > Kusnandar pisze: > > but i can't insert any data to mysql if i change > the variabel on top with this : > > > > my $nik = @_; # 8 digit > > my $password = @_; # 8 digit > > my $scode = @_; # 1 digit > > This is wrong, because that way all of your > variables are initializes > with first parameter of function. > > Either do: > > my $nik = shift; > my $password = shift; > my $scode = shift; > > or > > my ($nik, $password, $scode) = @_; > > Waldemar > > __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com