innodb recovery problems

2004-02-19 Thread R.Dobson
Hi, I have been backing up via the dubious method of copying the database data folder onto another machine where it is properly backed up onto DLT. (yes, I know I should have used mysqldump!) Recovering some tables today I copied the files back into their position (including the ibdata1 file and

innodb foreign key

2003-09-24 Thread R.Dobson
Hi, I have two innodb tables produced as show below CREATE TABLE `monogenic` ( `id` smallint(5) unsigned NOT NULL default '0', `exp_design` varchar(50) default NULL, `disease` varchar(50) default NULL, `omim` varchar(20) default NULL, `phenotype_ID` smallint(5) unsigned NOT NULL default

Re: innodb foreign key

2003-09-24 Thread R.Dobson
whoops, yes, thanks, missed that Victor Pendleton wrote: One thing that stands out is the data types are different sizes. http://www.mysql.com/doc/en/InnoDB_foreign_key_constraints.html -Original Message- From: R.Dobson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 8:42

last_insert_id()

2003-09-24 Thread R.Dobson
Hi, Is it possible to obtain the last_insert_id() for a particular column in a particular table? eg, say i wanted to obtain the last insert id of a column called id in table reference, something along the lines of: last_insert_id(reference.id) The reason I ask is because I want to initially

Re: innodb on delete cascade

2003-08-14 Thread R.Dobson
| +--+++--++-+-+--+---++-+-+++---+ 1 row in set (0.00 sec) cheers Rich Egor Egorov wrote: R.Dobson [EMAIL PROTECTED] wrote

Re: innodb on delete cascade

2003-08-14 Thread R.Dobson
Hi, i'm using Distrib 4.0.1-alpha, for sun-solaris2.8 (sparc) Victoria Reznichenko wrote: R.Dobson [EMAIL PROTECTED] wrote: mmm, i've just tried the example within the mysql docs: CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; CREATE TABLE child(id INT, parent_id INT

innodb on delete cascade

2003-08-14 Thread R.Dobson
Hi, I have a db where I have converted all the tables innodb. I have 2 tables in particular called gene and name. They both have a primary key call id. I want the primary key from name to be deleted when the corresponding key is deleted from gene. It doesn't seem to be happening as yet! show

Re: innodb on delete cascade

2003-08-14 Thread R.Dobson
to have a gene_id column in name, put an index on it, and then issue: alter table name add foreign key(gene_id) references gene(id) on delete cascade; In fact, I'm not sure you can actually create the constraint as you currently describe it R.Dobson wrote: Hi, yes, I should have included

Re: storing PDF files in mysql ?????

2002-10-08 Thread R.Dobson
hi, 2 ways to do this: a) don't store the file actually in the db but store the path to it. b)use the function LOAD_FILE(filename) to get the contents of a file as a string value and store as a blob. decide which to use depending on how many pics you have cheers Rich toby gibbson wrote:

Re: excel to mysql

2002-10-03 Thread R.Dobson
to load files into mysql: create a table: create table newtable (column1 int(10),column2 varchar(250)); import the data: load data infile '/path/to/file/file.csv' into table newtable fields terminated by ',' lines terminated by '\n' Alia Mikati wrote: Hello everybody I hope u can help me

Re: Someone has to know something on MySQLGUI?? - PLZ HLP!

2002-09-18 Thread R.Dobson
hi ,if you're on windows I would use mysqlfront. It has been discontinued but you can still get it from: http://mysqlfront.sstienemann.de/ alternatively, you could use urSQL: http://www.urbanresearch.com/software/utils/urbsql/ cheers Rich David Kramer wrote: Can anyone point me in the

Re: looking for sql gui application

2002-07-02 Thread R.Dobson
Hi, the latest version of mysql supports ssl connections. 'phpMyAdmin' is a browser based gui written in php. If your apache has mod_ssl then you could connect securely. http://www.phpwizard.net/projects/phpMyAdmin/ Alternatively, you could also use something like 'mysqlgui' and set up ssh

Re: How can this Oracle Query converted to MySQL

2002-06-26 Thread R.Dobson
create temporary table tmp SELECT IndustryID FROM Company_Industries CI WHERE CI.CompanyID = C.CompanyID; SELECT U.UserID FROM Transaction_Data T, Rfq_Data R ,Company C WHERE T.TransactionID = R.TransactionID AND (R.Industryid=1 or R.IndustryID=tmp.IndustryID) Cheers Rich Arul

Re: returning top two values

2002-05-22 Thread R.Dobson
Hi, thanks for all of the replies to my query. I'm not sure that I explained my problem very well as the solutions received are solutions to the problem I described, but not the one I meant :-) (I don't think anyway) I have a table in the format: family | member | score

Re: returning top two values

2002-05-22 Thread R.Dobson
another pair of SQL statements per result. If you are looking for order statistics on the order of the average number of members per family, then the single-statement approach will almost certainly be a better choice. -Rob (because I'm bored at work, that's why...) On 22/5/02 at 10:36 am, R.Dobson

Re: in and not in

2002-05-22 Thread R.Dobson
Hi, select table1.col_name FROM table1 left join table2 on table1.col_name = table2.colnmae where table2.clnmae is null Rich Inbal Ovadia wrote: Hi i want to do in mysql query like that: SELECT col_name FROM table1 NOT IN (select col_nmae FROM tablse2) how can i do that? thanks

returning top two values

2002-05-21 Thread R.Dobson
Hi, I have a table containing data on a number of families. I want to retrieve members of each family that have the two highest scoring values for a column. i.e the max and second max. Is there a function similar to max() or greatest() that will return the top 2 values when grouping by family