mysql 5.0: ERROR 1005 (HY000)

2004-06-06 Thread saiph
create database url; use url create table cath ( name varchar(10) primary key, ) type=innodb; create table site ( url varchar(40) primary key, aline varchar(40), cath varchar(10), constraint fk_cath foreign key(cath) references cath(name)

Re: update synopsis error

2004-06-01 Thread saiph
>> What version of MySQL are you using? i use: mysql Ver 12.22 Distrib 4.0.18, for pc-linux-gnu (i386). >> UPDATE t1, t2 SET t1.name=t2.name WHERE t1.id=1 AND t2.id=1; it works :), tnx again. -- >here are more things in heaven and earth, horatio, than are dreamt of in your philosophy. --

update synopsis error

2004-05-31 Thread saiph
hi, mysql> update table1 set c = (select c2 from table2 where c2 = 'value') where id = 123; give me an ERROR 1064. i.e. create table t1 ( id int primary key, name varchar(20) ); create table t2 ( id int primary key, name varchar(20) ); insert into t1 values(1, 'not right') insert into t2 v

Re: foreign keys help

2004-04-16 Thread saiph
alea> mysql -V mysql Ver 12.22 Distrib 4.0.17, for pc-linux-gnu (i386) but mysql < SHOW VARIABLES LIKE "have_innodb"; +---+---+ | Variable_name | Value | +---+---+ | have_innodb | NO| +---+---+ 1 row in set (0.09 sec) why? the gentoo eb

Re: foreign keys help

2004-04-16 Thread saiph
<- snip -> Because your tables are not InnoDB. Check if InnoDB is enabled: SHOW VARIABLES LIKE "have_innodb"; <- snip -> no, InnoDB is not enabled. how can i enable it? the referece manual show a my.cnf configuration for a machine with at least 2gb of ram and 60 of hard disk. how can

foreign keys help

2004-04-14 Thread saiph
hi list, i'm studing foreign keys but my sql code does not react as would imagine when i insert inconsistent data. i.e. create database urls; use urls; create table caths ( name varchar(7) primary key ) type = innodb; create table urls ( name varchar(10) primary key, home varchar(