Re: Can a table be copied across the DBs?

2006-08-17 Thread Chris
[EMAIL PROTECTED] wrote: Hi All, I want to copy a table (along with its contents) from one database to another database. In the destination database the table doesn't exist. Please let me know, if there is any way to do it. mysqldump -u -p original_databasename | mysql -u -p ne

Can a table be copied across the DBs?

2006-08-17 Thread ravi.karatagi
Hi All, I want to copy a table (along with its contents) from one database to another database. In the destination database the table doesn't exist. Please let me know, if there is any way to do it. Regards, Ravi K The information contained in this electronic message and an

RE: 1 to many relationship

2006-08-17 Thread Peter Lauri
This was very good reading. And we all learn something new everyday. What you are writing makes so much sense. This also comes from me relying on that all things said on this list is true, and that all members do know what they write before they write it. I try to never post a reply to anyone unle

Re: AW: AW: find in list

2006-08-17 Thread Michael Stassen
Charlie Schaubmair wrote: Hello Michael, thx, I know normalisation. BUT normalisation isn't always the best (fastest) way to store, or select the datas, this is why I don't use it most time. Often I'm testing my projects with normalisation and without and my last very big problem with big selec

Re: 1 to many relationship

2006-08-17 Thread Michael Stassen
Chris wrote: > Hmm. Must be a recent change, I've had problems with that in the past. > > Thanks for the pointers. You're welcome. I'm not sure which part you think is a recent change. Certainly, mysql 5 with its demotion of the precedence of the implicit join is recent. Perhaps it depends o

Re: Log files

2006-08-17 Thread Chris
bruce wrote: chris... hate to tell you.. .but you can have the log files set as i described.. the real issue was due to permission issues on the dir/file for the mysql lol.. i'm not having much luck answering questions lately ;) Thanks for letting us know about the fix. -- MySQL General Mai

Re: Tables/sum

2006-08-17 Thread Chris
Peter South wrote: Ok here is what I'm trying to do. Table 1 Table 2 Table 3 Column1(id) Column2 (score) Column1(id) Column2(score)Column1(id) Column2(name) 1

Re: Log files

2006-08-17 Thread Chris
bruce wrote: hi... i changed the mysql my.cnf to provide log files. i restarted mysql, but i don't see the log files... any idea as to what i may have missed. i'm running FC4, mysql 4.1. the my.cnf is: [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock set-variable = max_connect

Re: 1 to many relationship

2006-08-17 Thread Chris
Michael Stassen wrote: Chris wrote: > select * > from customers c, issues i, customer_issues ci > where c.customerid=ci.customerid > AND ci.issueid=i.issueid; Chris wrote: > That query should be the same as this one: > select * > from customers c > inner join customer_issues ci on (c.

Re: 1 to many relationship

2006-08-17 Thread Chris
EXPLAIN is documented in the manual . So it is, but it doesn't show me the decisions it makes. It shows me whether it will use an index or not, it won't show me how it puts the whole thing together. Compare to the postgres one: http://w

Tables/sum

2006-08-17 Thread Peter South
Ok here is what I'm trying to do. Table 1 Table 2 Table 3 Column1(id) Column2 (score) Column1(id) Column2(score) Column1(id) Column2(name) 110

RE: More query help for user-defined values

2006-08-17 Thread Robert DiFalco
One simple solution is to denormalize a little and take the refTypeID column out of StringValue and add it to the Links table. Then I could have: SELECT P.* FROM Person P LEFT JOIN StringLinks L1 ON P.ID = L1.parentID AND L1.refTypeID = 1 LEFT JOIN StringValue SV1 ON L1.valueID

RE: Tables/sum

2006-08-17 Thread Jay Blanchard
[snip] [snip] Can anyone tell me how to add up values in different tables? For example Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) =3D n [/snip] SELECT t1.c1 + t2.c2 + t3.c3 FROM table WHERE id =3D n The above doesn't work I'm afraid. [/snip] Don't be afraid, you must join th

RE: Tables/sum

2006-08-17 Thread Jay Blanchard
[snip] Can anyone tell me how to add up values in different tables? For example Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) =3D n [/snip] SELECT t1.c1 + t2.c2 + t3.c3 FROM table WHERE id =3D n The above doesn't work I'm afraid. [/snip] Don't be afraid, you must join the tables

Re: Tables/sum

2006-08-17 Thread ddevaudreuil
How about: select sum(t1.column1 + t2.column2 +t3.column3) as Columnsum from Table1 t1 inner join Table2 t2 on t1.id=t2.id inner join Table3 t3 on t2.id=t3.id where t1.id=n group by t1.id This is a rough cut that assumes the id value in the join exists in all three tables. If it's missing in

Tables/sum

2006-08-17 Thread Peter South
Can anyone tell me how to add up values in different tables? For example Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) =3D n [/snip] SELECT t1.c1 + t2.c2 + t3.c3 FROM table WHERE id =3D n The above doesn't work I'm afraid. Peter

Re: Crashing mysql Ver 14.7 Distrib 5.0.2-alpha, for pc-linux (i686)

2006-08-17 Thread Eric Braswell
Is there a reason you cannot upgrade from an early =alpha= version of 5.0 ? I think you fill find the release versions more stable. -- Eric Braswell Web Manager MySQL AB Cupertino, USA murthy gandikota wrote: Hi Can someone tell me where in the file system to look for the logs? Mysql h

Re: Crashing mysql Ver 14.7 Distrib 5.0.2-alpha, for pc-linux (i686)

2006-08-17 Thread murthy gandikota
Looks like I have too many connections to the database. I made sure all the connections are closed after use. Hope this is the fix. Anyone please confirm. Thanks murthy gandikota <[EMAIL PROTECTED]> wrote: Can someone please help me figure out what's in this mysqld output before crashing: my

RE: Tables/sum

2006-08-17 Thread Jay Blanchard
[snip] Can anyone tell me how to add up values in different tables? For example Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) = n [/snip] SELECT t1.c1 + t2.c2 + t3.c3 FROM table WHERE id = n -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscr

Tables/sum

2006-08-17 Thread Peter South
Can anyone tell me how to add up values in different tables? For example Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) = n Thanks Peter

Re: Crashing mysql Ver 14.7 Distrib 5.0.2-alpha, for pc-linux (i686)

2006-08-17 Thread murthy gandikota
Can someone please help me figure out what's in this mysqld output before crashing: mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be

Crashing mysql Ver 14.7 Distrib 5.0.2-alpha, for pc-linux (i686)

2006-08-17 Thread murthy gandikota
Hi Can someone tell me where in the file system to look for the logs? Mysql has been crashing once every hour. Memory is not the issue. This is how I start the mysql: nohup /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/ local/mysql/var --user=mysql --pid-file

Re: 1 to many relationship

2006-08-17 Thread Michael Stassen
Peter Lauri wrote: > Is there not a better way to do that? What will happen there is that a large > result set will be created because when you just do "select * from > customers c, issues i, customer_issues ci" it will be like the inner product > from all these tables, and then just choosing the

Re: 1 to many relationship

2006-08-17 Thread Michael Stassen
Chris wrote: > select * > from customers c, issues i, customer_issues ci > where c.customerid=ci.customerid > AND ci.issueid=i.issueid; Chris wrote: > That query should be the same as this one: > select * > from customers c > inner join customer_issues ci on (c.customerid=ci.customerid) > inne

Re: Trouble with using "IN" for a sub-query statement

2006-08-17 Thread Michael Stassen
Chris wrote: Chris White wrote: On Monday 07 August 2006 12:13 pm, William DeMasi wrote: I meant to have it say : "select * from c2iedm_dev2.act where act_id IN (select obj_act_id from c2iedm_dev2.act_functl_assoc where subj_act_id =24);" What does the output of (the subselect): select obj_

More query help for user-defined values

2006-08-17 Thread Robert DiFalco
To support user defined properties I have the following tables: TABLE StringType LONG ID PKEY VARCHAR name ... VARCHAR defaultValue TABLE StringValue LONG parentID LONG typeID VARCHAR val Assume the correct indices are in place. Different string value types ca

Re: select as an array.

2006-08-17 Thread Jo�o C�ndido de Souza Neto
I found another solution myself. Thanks. ""João Cândido de Souza Neto"" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > Hi everyone, > > I´m not sure if it´s the right place to get such answer, but if someone > know, please, help me. > > In a select id,name,picture1,pictur

Log files

2006-08-17 Thread bruce
hi... i changed the mysql my.cnf to provide log files. i restarted mysql, but i don't see the log files... any idea as to what i may have missed. i'm running FC4, mysql 4.1. the my.cnf is: [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock set-variable = max_connections=1000 set-v

Simultaneous connections

2006-08-17 Thread bruce
hi... i'm creating an app that spawns child processes. each of these processes will attempt to open a connection to the mysql db, and try to write/select information to the db. however, in doing initial testing, it appears that there is a limit to how much/fast mysql can handle simultaneous conne

select as an array.

2006-08-17 Thread Jo�o C�ndido de Souza Neto
Hi everyone, I´m not sure if it´s the right place to get such answer, but if someone know, please, help me. In a select id,name,picture1,picture2,picture3 from product where id="10" i get an array with each colum in each element like this $result ("id" => "10", "name" => "name of product", "

Re: Slow queries

2006-08-17 Thread Jon Molin
On 8/17/06, Chris <[EMAIL PROTECTED]> wrote: > Unfortunately didn't that help, it leads to: > ++-+---+---+--- > > | id | select_type | table | type | possible_keys > | key | key_len | ref | rows| Extra >

Re: Stability of MySQL 5.1.11

2006-08-17 Thread Joerg Bruehe
Hi Jacques, all! Jacques Marneweck wrote: Hi, I'm wondering what the status of MySQL 5.1.11 is regarding the roadmap for 5.1 changing from "beta" to "generally available"? 5.1.11 is labeled "beta", like all 5.1 versions since 5.1.7. When more issues have been sorted out, the status will ch

Re: Slow queries

2006-08-17 Thread Chris
Unfortunately didn't that help, it leads to: ++-+---+---+--- | id | select_type | table | type | possible_keys | key | key_len | ref | rows| Extra | ++-+---+---+--- | 1 |

Re: Slow queries

2006-08-17 Thread Jon Molin
On 8/17/06, Chris <[EMAIL PROTECTED]> wrote: Jon Molin wrote: > Hi list > > I have 5 tables: > > words (word_id int auto_increment, word varbinary(40)) (has ~3.5M > rows) with the keys: > PRIMARY KEY (`word_id`),UNIQUE KEY `word_ind` (`word`) > > phrases (phrase_id int auto_increment, phrase var

Re: mysqladmin claims password in crontab !

2006-08-17 Thread Chris
Marc MENDEZ wrote: Hi, For mysqladmin, this parameter does not exist. I'll try anyway by forcing password and user on the command line. I'll check tomorrow. Sure it does. $ mysqladmin --help | grep extra --defaults-extra-file=# Read this file after the global files are read -- MySQL Gener

Re: Slow queries

2006-08-17 Thread Chris
Jon Molin wrote: Hi list I have 5 tables: words (word_id int auto_increment, word varbinary(40)) (has ~3.5M rows) with the keys: PRIMARY KEY (`word_id`),UNIQUE KEY `word_ind` (`word`) phrases (phrase_id int auto_increment, phrase varbinary(100)) (has ~11M rows) with the keys: PRIMARY KEY (`p

Slow queries

2006-08-17 Thread Jon Molin
Hi list I have 5 tables: words (word_id int auto_increment, word varbinary(40)) (has ~3.5M rows) with the keys: PRIMARY KEY (`word_id`),UNIQUE KEY `word_ind` (`word`) phrases (phrase_id int auto_increment, phrase varbinary(100)) (has ~11M rows) with the keys: PRIMARY KEY (`phrase_id`),UNIQUE