Re: Primary key

2007-01-11 Thread Dan Nelson
In the last episode (Jan 11), Steffan A. Cline said: > Is there anyway to do a SELECT or DESCRIBE or SHOW statement which can > return the primary key field of a specified table? > > Pseudo code: select primary_key_field_name from mytable. SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHER

Primary key

2007-01-11 Thread Steffan A. Cline
Is there anyway to do a SELECT or DESCRIBE or SHOW statement which can return the primary key field of a specified table? Pseudo code: select primary_key_field_name from mytable. Thanks Steffan --- T E L 6 0 2 . 5 7 9 . 4 2 3 0 | F A

Re: Need any that can translate this

2007-01-11 Thread Dušan Pavlica
Temporary tables are stored in memory so they are as quick as joins. Dusan Ran napsal(a): Not necessarily to use temp tables,they are expensicve. Temp tables introduce extra disk IOs which slows down compare to using explicit JOINs which is done in memory. Here is techniques on how to rewrite

Dual Hardisk

2007-01-11 Thread sangprabv
Hi, I have a database named X on a hardisk, and the hardisk can not store new record because it has no space anymore. Can I just add a new hardisk and ask MySQL to store new record for database X to the new hardisk? Please share me the knowledge to do it, many thanks for your helps. Regards Wil

Re: multiple instances of mysql on a given server

2007-01-11 Thread Chris White
bruce wrote: hi... i'm trying to determine if it's safe, or if there are pitfalls to running simultaneous copies of mysql on a given server. assume that the instances are completely separate, dirs/ports/etc... The one reason why is because of the network load and the memory usage. MySQL h

Insert ... Select troubles

2007-01-11 Thread Ed Reed
I need some help creating an INSERT * SELECT statement that supplies a record counter in the returned items. Here's the task, I have t1 and t2. t1 is GroupCount, ItemCount, Field1, Field2, Field3. t2 is Field1, Field2, Field3. t1 has a multiple field unique key called Request that has Group

multiple instances of mysql on a given server

2007-01-11 Thread bruce
hi... i'm trying to determine if it's safe, or if there are pitfalls to running simultaneous copies of mysql on a given server. assume that the instances are completely separate, dirs/ports/etc... can't really determine from the various information sources on the net. -bruce -- MySQL General

max connections question

2007-01-11 Thread bruce
hi... i can modify the max_connections param in the my.cnf file... does mysql provide a way for me to essentially guarantee that a given process/user can always access the db, so the process/user doesn't get the 'max connection' error... i thought i had seen something regarding this awhile back,

Re: how to take advantage of STR_TO_DATE

2007-01-11 Thread Jake Peavy
On 1/11/07, Dan Nelson <[EMAIL PROTECTED]> wrote: In the last episode (Jan 11), Jake Peavy said: > On 1/11/07, Gilles MISSONNIER <[EMAIL PROTECTED]> wrote: > >How could I load in the database, data from a text file containaing > >date in a NOT MySQL standard date format [precisely char(10)], so

Re: how to take advantage of STR_TO_DATE

2007-01-11 Thread Dan Nelson
In the last episode (Jan 11), Jake Peavy said: > On 1/11/07, Gilles MISSONNIER <[EMAIL PROTECTED]> wrote: > >How could I load in the database, data from a text file containaing > >date in a NOT MySQL standard date format [precisely char(10)], so > >that I get the date into a MySQL standard date for

Re: how to take advantage of STR_TO_DATE

2007-01-11 Thread Felix Geerinckx
[EMAIL PROTECTED] (Gilles MISSONNIER) wrote in news:[EMAIL PROTECTED]: > I rewrite my question in a simpler (?) way : > How could I load in the database, data from a text file containaing > date in a NOT MySQL standard date format [precisely char(10)], so that > I get the date into a MySQL standa

Re: how to take advantage of STR_TO_DATE

2007-01-11 Thread Jake Peavy
On 1/11/07, Gilles MISSONNIER <[EMAIL PROTECTED]> wrote: hello, I rewrite my question in a simpler (?) way : How could I load in the database, data from a text file containaing date in a NOT MySQL standard date format [precisely char(10)], so that I get the date into a MySQL standard date forma

replication - master/slave, distributed db questions...

2007-01-11 Thread bruce
hi... i have a project and i'm trying to figure out the best approach to architect a solution to resolve the issues i'm facing. i'm open to whatever might be the 'best' solution. keep in mind, this is a 'project' that's my own, kind of a garage function!! i'm creating a distributed web parsing/cr

Re: Need any that can translate this

2007-01-11 Thread Ran
Not necessarily to use temp tables,they are expensicve. Temp tables introduce extra disk IOs which slows down compare to using explicit JOINs which is done in memory. Here is techniques on how to rewrite a subquery with JOINs: http://dev.mysql.com/doc/refman/4.1/en/rewriting-subqueries.html Ran

Re: Need any that can translate this

2007-01-11 Thread Felix Geerinckx
[EMAIL PROTECTED] (Tomás Abad Fernández) wrote in news:[EMAIL PROTECTED]: > I dont know why thease don't work at MySql 3.21 , anyone can help me > to make this compatible with mysql3? 3.21 is really ancient ... > > $query = "SELECT * FROM facturas WHERE pedido IN (SELECT orders_id > FROM order

Re: Need any that can translate this

2007-01-11 Thread Peter Bradley
Ysgrifennodd Tomás Abad Fernández: I dont know why thease don't work at MySql 3.21 , anyone can help me to make this compatible with mysql3? $query = "SELECT * FROM facturas WHERE pedido IN (SELECT orders_id FROM orders WHERE user_id='".$user."') ORDER BY factura_id"; Thanks for all. If

Need any that can translate this

2007-01-11 Thread Tomás Abad Fernández
I dont know why thease don't work at MySql 3.21 , anyone can help me to make this compatible with mysql3? $query = "SELECT * FROM facturas WHERE pedido IN (SELECT orders_id FROM orders WHERE user_id='".$user."') ORDER BY factura_id"; Thanks for all.

Re: loading files onto MySQL

2007-01-11 Thread Chris White
Scott Yamahata wrote: Newbie question here. Using Mac OSX Server 10.4.4. Do most MySQL tasks in terminal window. Recently purchased software that tells me to go to Control Panel (which I don't think I have--though I have MySQL tools) and load their file onto the MySQL database. Generally th

Re: mysql data into CSV file. / (Errcode: 13)

2007-01-11 Thread Dwight E Chadbourne
There's no issue. That's how it's supposed to work. Read about permissions for directories. It's pretty straight forward with Linux. I learned on the RedHat manuals. Shain Lee <[EMAIL PROTECTED]> 01/11/2007 09:28 AM To: Nils Meyer <[EMAIL PROTECTED]> cc: MySql

Re: Multiple table updates (Was: Does Update allow for aliases)

2007-01-11 Thread Brent Baisley
The key part of the UPDATE documentation for me was: The table_references clause lists the tables involved in the join. Its syntax is described in Section 13.2.7.1, "JOIN Syntax". Basically you can take almost any SELECT statement with JOINs and convert it to an UPDATE. There are certain limitat

loading files onto MySQL

2007-01-11 Thread Scott Yamahata
Newbie question here. Using Mac OSX Server 10.4.4. Do most MySQL tasks in terminal window. Recently purchased software that tells me to go to Control Panel (which I don't think I have--though I have MySQL tools) and load their file onto the MySQL database. I'm not sure what this means. If I

Re: mysql data into CSV file. / (Errcode: 13)

2007-01-11 Thread Shain Lee
Thank you , that is working with /tmp/ directory. actually what is the issue behind writing that files into user defined folder , like /home/test/ ? have you find any solution for that ? Thank you, Shaine. Nils Meyer <[EMAIL PROTECTED]> wrote: Hi Shain, Shain Lee wrote: > ERROR 1 (HY000): Can

RE: Select where the column names are not fully known

2007-01-11 Thread Jerry Schwartz
I don't know if this can be done purely in SQL. Programmatically, you could do something like SHOW COLUMNS FROM tablename LIKE "vector%"; That would give you the names (and types, which you can ignore) of the desired columns. Then you can programmatically build up the list of columns. Regards,

Re: Multiple table updates (Was: Does Update allow for aliases)

2007-01-11 Thread Brent Baisley
The key part of the documentation for me was: - Original Message - From: "Chris White" <[EMAIL PROTECTED]> To: Sent: Wednesday, January 10, 2007 12:55 PM Subject: Multiple table updates (Was: Does Update allow for aliases) Reading the noted previous thread, I was curious as to updatin

Re: Select where the column names are not fully known

2007-01-11 Thread Brent Baisley
Your best bet would be to dynamically build the field string using whatever you are coding the front end on. A simple configuration paramter would tell you how many fields there are. Now, if you don't need to retain your current table structure, I would recommend switching it to a name/value pai

Re: mysql data into CSV file. / (Errcode: 13)

2007-01-11 Thread Nils Meyer
Hi Shain, Shain Lee wrote: ERROR 1 (HY000): Can't create/write to file '/home/shaine/Music_Details.csv' (Errcode: 13) I faced a problem as mentioned above. really got stucked. how can i solve that problem ? is it a bug ? Error 13 is Permission Denied. The MySQL daemon cannot write to your

New Free BitKeeper Client

2007-01-11 Thread Stefan Hinz
New Free BitKeeper Client - If you're installing MySQL from our development source trees you need BitKeeper to access those source trees. You can find out which source trees are publicly available by looking at http://mysql.bkbits.net/. BitKeeper isn't free software, but th

Re: Strange query.

2007-01-11 Thread Felix Geerinckx
[EMAIL PROTECTED] ("Paul Halliday") wrote in news:[EMAIL PROTECTED]: > Could you expand a little on how that works? USE test; DROP TABLE IF EXISTS event; CREATE TABLE event (timestamp DATETIME NOT NULL); INSERT INTO event (timestamp) VALUES ('2007-01-09 20:02:15'), ('2007-01-09 20:02:15'), ('200

Re: mysql data into CSV file. / (Errcode: 13)

2007-01-11 Thread Shain Lee
MySql - server version: 4.1.7 OS - RedHat Linux AS 4 mysql> use Music; mysql> SELECT * INTO OUTFILE '/home/shaine/Music.csv' FROM Music_Details; ERROR 1 (HY000): Can't create/write to file '/home/shaine/Music_Details.csv' (Errcode: 13) I faced a problem as mentioned above. really got stucked.

Re: Strange query.

2007-01-11 Thread Paul Halliday
Could you expand a little on how that works? I am starting to think that I wont be able to get the results I need without post processing. Looking at the results: ... | 2007-01-09 20:02:15 | | 2007-01-09 20:02:15 | | 2007-01-09 20:03:20 | | 2007-01-09 20:08:33 | | 2007-01-09 20:08:33 | | 2007-01

Re: how to take advantage of STR_TO_DATE

2007-01-11 Thread Gilles MISSONNIER
hello, I rewrite my question in a simpler (?) way : How could I load in the database, data from a text file containaing date in a NOT MySQL standard date format [precisely char(10)], so that I get the date into a MySQL standard date format in a column of type "date" ? an other way to ask my q

Select where the column names are not fully known

2007-01-11 Thread andy.lawton
We have a logging package that logs data into a table. Part of the data that is logged are elements of a vector. A logging application automatically takes out the elemets of the vector and automatically creates column names based on it's name and the element. This data will be mixed in with lots of