Re: Help on Unknown field error

2006-01-30 Thread Michael Stassen
pedro mpa wrote: Greetings. I need help on the following query. I get an error like "Unknown/Invalid column total_price [...]" when I try filter by total_price. How can I do this correctly? SELECT receipts.*, (SELECT SUM(receipt_itens.price) FROM receipt_itens WHERE receipt_itens.id_

Re: Help Understanding Document Syntax

2006-01-30 Thread Michael Stassen
Rhino wrote: The 'symbol' you are referring to, in the foreign key clause of the CREATE TABLE statement, is simply an opportunity for you to choose a name for the foreign key of the table; if you don't choose a name, MySQL will generate a default name for you. Therefore, if you do this:

Help on Unknown field error

2006-01-30 Thread pedro mpa
Greetings. I need help on the following query. I get an error like "Unknown/Invalid column total_price [...]" when I try filter by total_price. How can I do this correctly? SELECT receipts.*, (SELECT SUM(receipt_itens.price) FROM receipt_itens WHERE receipt_itens.id_receipt=recei

Re: MySQL ignores foreign key relationships between tables?

2006-01-30 Thread Paul DuBois
At 20:41 -0500 1/30/06, Ferindo Middleton Jr wrote: Paul DuBois wrote: At 18:03 -0500 1/29/06, Ferindo Middleton Jr wrote: Ferindo Middleton Jr wrote: Ferindo Middleton Jr wrote: Paul DuBois wrote: At 17:56 -0500 1/28/06, Ferindo Middleton Jr wrote: I have two tables, registration & schedul

Re: Sort before grouping

2006-01-30 Thread Michael Stassen
David Förster wrote: Hi, is there any way to get datasets sorted before they're grouped by GROUP BY()? I have a table of events at different locations and want to select the newest one for each location. However "SELECT * FROM events GROUP BY location ORDER BY date DESC" gives me just some eve

RE: How to login to MYSQL as "root" without knowing the passward

2006-01-30 Thread Logan, David (SST - Adelaide)
Hi Sol, I think you can change the startup properties from the services screen. If you right click on the MySQL service, you can set startup parameters at the bottom of the first screen. You could set the --skip-grant-tables there. Regards ---

RE: How to login to MYSQL as "root" without knowing the passward

2006-01-30 Thread Sweet, Charles E
sol beach wrote: > I've been asked to assist the folks who own the data in the database, > but folks who used to maintain it are no longer with the company. > This installation resides on a Windows 2003 server to which I have > local admin rights. > What is the most painl

RE: How to login to MYSQL as "root" without knowing the passward

2006-01-30 Thread Rob Gormley
Windows 2003 - try 'net stop mysql' from a commandline. Rob > -Original Message- > From: sol beach [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 31 January 2006 12:47 PM > To: [EMAIL PROTECTED] > Cc: mysql@lists.mysql.com > Subject: Re: How to login to MYSQL as "root" without knowing > th

Re: How to login to MYSQL as "root" without knowing the passward

2006-01-30 Thread Dan Trainor
sol beach wrote: Sounds reasonable, but how do I shutdown down MYSQL so I can restart with --skip-grant-tables option? On 1/30/06, *Dan Trainor* <[EMAIL PROTECTED] > wrote: sol beach wrote: > I've been asked to assist the folks who own the data in the da

Re: How to login to MYSQL as "root" without knowing the passward

2006-01-30 Thread sol beach
Sounds reasonable, but how do I shutdown down MYSQL so I can restart with --skip-grant-tables option? On 1/30/06, Dan Trainor <[EMAIL PROTECTED]> wrote: > > sol beach wrote: > > I've been asked to assist the folks who own the data in the database, > but > > folks who used to maintain it are no lon

Re: How to login to MYSQL as "root" without knowing the passward

2006-01-30 Thread Dan Trainor
sol beach wrote: I've been asked to assist the folks who own the data in the database, but folks who used to maintain it are no longer with the company. This installation resides on a Windows 2003 server to which I have local admin rights. What is the most painless way to get "root" access to thi

Re: MySQL ignores foreign key relationships between tables?

2006-01-30 Thread Ferindo Middleton Jr
Paul DuBois wrote: At 18:03 -0500 1/29/06, Ferindo Middleton Jr wrote: Ferindo Middleton Jr wrote: Ferindo Middleton Jr wrote: Paul DuBois wrote: At 17:56 -0500 1/28/06, Ferindo Middleton Jr wrote: I have two tables, registration & schedules, that look like this: CREATE TABLE registration (

How to login to MYSQL as "root" without knowing the passward

2006-01-30 Thread sol beach
I've been asked to assist the folks who own the data in the database, but folks who used to maintain it are no longer with the company. This installation resides on a Windows 2003 server to which I have local admin rights. What is the most painless way to get "root" access to this database? I am mo

Upgrading from 4.1 to 5.0 breaks things?

2006-01-30 Thread Stever
Hello, I am in an environment that has a bunch of unrelated mysql databases that exist on one server. I would like to upgrade to mysql 5.0 to take advantage of the newer features, but I don't want to break existing functionality. I checked out http://dev.mysql.com/doc/refman/5.0/en/upgrading-fro

Re: How to restrict this query... (need subquery?)

2006-01-30 Thread René Fournier
Hi Peter, Yes, after I posted the question, I did some more reading and learned that it's possible to have several conditions in the ON clause. I tried: SELECT accounts.id, accounts.account_name, accounts.company_name, history.msg_src, COUNT(history.msg_src) as msg_num FROM accounts LEFT JOIN

Re: How to restrict this query... (need subquery?)

2006-01-30 Thread Rhino
Rene, The count(*) function should always report the exact number of rows that satisfy the query. If the query has only a WHERE clause, count(*) should report the number of rows that satisfied the WHERE. If the query has a only a GROUP BY, count(*) should report the number of groups found by t

Re: How to restrict this query... (need subquery?)

2006-01-30 Thread Peter Brawley
René >What I need to do, somehow, is apply that WHERE clause >to the COUNT part of the SELECT. Any ideas? Did you try moving your WHERE condition to the ON clause? PB - René Fournier wrote: Hello, I have two tables: Accounts and History. Basically, I want to see how much activity each

row number discrepancy while enabling keys

2006-01-30 Thread Michael Chester
Hi, Can anyone point me in the right direction to find out why I keep getting the following error? The table is newly created and then 14 LOAD DATA calls are made to load approximately 24-30 million rows. Its a simple MyISAM table, no triggers, proceedures etc with a couple of simple indexes.

How to restrict this query... (need subquery?)

2006-01-30 Thread René Fournier
Hello, I have two tables: Accounts and History. Basically, I want to see how much activity each account has during a given period of time. Even if an account has no activity, I still want to see it in the result (naturally with zeros or null). In the history table, there is a column calle

Relocation error during link

2006-01-30 Thread Barbara Deaton
All, I've tried searching through the manual and couldn't find anything. I've compiled a simple program and when I link the object file to the mysql client libraries I'm getting a fatal relocation error: ld: fatal: relocation error: R_SPARC_H44: file /usr/local/dbi/mysql/5.0/lib/libmysqlclien

Re: display a hierarchic tree

2006-01-30 Thread Pete Harlan
On Mon, Jan 30, 2006 at 03:04:20PM +0200, Gleb Paharenko wrote: > Hello. > > This is not an exact answer on your question, however it could be > interesting for you: > http://dev.mysql.com/tech-resources/articles/hierarchical-data.html This is a good article. One thing it leaves out of the dis

RE: Support between MySQL and PHP

2006-01-30 Thread George Law
Phillip, You probably didn't need to upgrade - just set the mysql password to use "old_password": FTFM: "As indicated earlier, a danger in this scenario is that it is possible for accounts that have a short password hash to become inaccessible to pre-4.1 clients. A change to such an account'

upgrade to mysql 5.x?

2006-01-30 Thread suomi
Hi listers i have been looking around quite a bit for info on - when do i need to upgrade to mysql 5.x (because such and such functionality is not available in 4.1.x) - when is it recommended to upgrade to mysql 5.x (because such and such functionality is better implemented) - when will i fail t

Re: Trans.: Re: Finding the row number satisfying a conditon in a result set

2006-01-30 Thread SGreen
Jacques Brignon <[EMAIL PROTECTED]> wrote on 01/30/2006 10:18:59 AM: > Oops! forgoten to include the list in the relply > > -- > Jacques Brignon > > - Message transféré de Jacques Brignon <[EMAIL PROTECTED]> - >Date : Mon, 30 Jan 2006 16:16:53 +0100 > De : Jacques Brignon <[EMAI

Re: Sort before grouping

2006-01-30 Thread Peter Brawley
David, I have a table of events at different locations and want to select the newest one for each location. Famous & oft-asked, how to retrieve a groupwise-max values. See http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html PB - David Förster wrote: Hi, is t

Re: Help Understanding Document Syntax

2006-01-30 Thread Rhino
The 'symbol' you are referring to, in the foreign key clause of the CREATE TABLE statement, is simply an opportunity for you to choose a name for the foreign key of the table; if you don't choose a name, MySQL will generate a default name for you. Therefore, if you do this: CREATE TABLE

RE: [SPAM] - Trans.: Re: Finding the row number satisfying a conditon in a result set - Bayesian Filter detected spam

2006-01-30 Thread Gordon Bruce
You can use a user variable [EMAIL PROTECTED] in the sample below} to number the rows in the result set. mysql> set @row:=0; Query OK, 0 rows affected (0.00 sec) mysql> select @row:[EMAIL PROTECTED], city_Name from citiesw limit 10; +--+-+ | @row:[EMAIL PROTECTED] |

Trans.: Re: Finding the row number satisfying a conditon in a result set

2006-01-30 Thread Jacques Brignon
Oops! forgoten to include the list in the relply -- Jacques Brignon - Message transféré de Jacques Brignon <[EMAIL PROTECTED]> - Date : Mon, 30 Jan 2006 16:16:53 +0100 De : Jacques Brignon <[EMAIL PROTECTED]> Adresse de retour :Jacques Brignon <[EMAIL PROTECTED]> Sujet : Re: Fin

Re: Finding the row number satisfying a conditon in a result set

2006-01-30 Thread Jake Peavy
On 1/30/06, Jacques Brignon <[EMAIL PROTECTED]> wrote: > > I would like some advice on the various and best ways of finding the rank > of the > row which satisfies a given condition in a rsult set. > > Let's assume that the result set includes a field containing an identifier > from > one of the t

Sort before grouping

2006-01-30 Thread David Förster
Hi, is there any way to get datasets sorted before they're grouped by GROUP BY()? I have a table of events at different locations and want to select the newest one for each location. However "SELECT * FROM events GROUP BY location ORDER BY date DESC" gives me just some event per location and the

Re: Support between MySQL and PHP

2006-01-30 Thread Philip Thompson
Thanks to everyone's help. Instead of downgrading MySQL, I went ahead and upgraded to PHP5. After I did that, it seemed to fix the connection issue I was having. ~Philip On Jan 30, 2006, at 4:41 AM, James Harvard wrote: MySQL versions >= 4.1 use a new, more secure authentication protocol

Finding the row number satisfying a conditon in a result set

2006-01-30 Thread Jacques Brignon
I would like some advice on the various and best ways of finding the rank of the row which satisfies a given condition in a rsult set. Let's assume that the result set includes a field containing an identifier from one of the table used in the query and that not two rows have the same value for t

Help Understanding Document Syntax

2006-01-30 Thread Scott Purcell
Hello, I have created some tables a while back, and of course, and I am learning, I have found problems with duplicate entries and other problems. So upon a fresh read of the 5.1 docs, I am trying to understand the word "symbol" after the constraint. I would like to be able to somehow comb

charset

2006-01-30 Thread OKAN ARI
How can I set the characterset to latin5 for mysq4 in linux? OKAN -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Best Idea On InnoDB Table for Pooling System

2006-01-30 Thread Ady Wicaksono
Imagine American Idol where users vote on their Idols Imagine that the system is using an innodb table... where INSERTING is very fast might be concurrent BUT inserting is done over HTTP and PHP (not enable multiple insert :(( ) Updating status for each data inserted is also very fast ...

Re: Testing Concurrent Insert on InnoDB

2006-01-30 Thread Ady Wicaksono
Below is the SQL to create table Y CREATE TABLE `Y` ( `t_y_id` int(11) NOT NULL auto_increment, `t_y_time` timestamp NOT NULL default CURRENT_TIMESTAMP, `t_y_dest` varchar(16) NOT NULL default '', `t_y_msg` varchar(160) NOT NULL default '', `t_y_status` tinyint(2) NOT NULL default '0', `t_y

Re: display a hierarchic tree

2006-01-30 Thread Gleb Paharenko
Hello. This is not an exact answer on your question, however it could be interesting for you: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html Jochen Kaechelin wrote: > I have the following table: > > mysql> select * from link_categories; > ++---+-+--

Re: Can't reload from dump file

2006-01-30 Thread Gleb Paharenko
Hello. Perhaps, you haven't recreated the InnoDB tablespace after moving the database. Recreate the InnoDB table space, or follow recommendations from the error message. About InnoDB table space you can read here: http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html Chris Mason (Li

Re: Testing Concurrent Insert on InnoDB

2006-01-30 Thread Gleb Paharenko
Hello. According to: http://dev.mysql.com/doc/refman/5.0/en/innodb-locks-set.html INSERT ... SELECT set a non-next-key lock on each row. So in most cases you should be able to insert the record into Y. Please, provide the CREATE statement for table Y and the output of 'show variables' statement

Re: Revert using Binlog

2006-01-30 Thread Gleb Paharenko
Hello. If you have all inserts and updates on the tables from which you've lost your data, you can simply recover the whole database from the binary logs, however if the logs were create later than tables, most probably you won't get the consistent data in them. Use --stop-datetime option for mysq

Re: default characterset of function string parameter

2006-01-30 Thread Gleb Paharenko
Hello. This seems like a bug: http://bugs.mysql.com/bug.php?id=16676 Hirofumi Fujiwara wrote: > Dear MySQL fans, > > I am checking MySQL 5.0 to use multibyte strings, Japanese. > > When I use char type parameter without CHARACTER SET clause, > parameter's character set is not the database

Re: my.cnf files

2006-01-30 Thread Gleb Paharenko
Hello. Example files are usually shipped with MySQL distribution. Check the support-files directory for my-*.cnf examples. Search in archives at http://list.mysql.com/mysql as well. Philip R. Thompson wrote: > Hi all. > > I am having some troubles with what should be contained within my > my.c

Testing Concurrent Insert on InnoDB

2006-01-30 Thread Ady Wicaksono
I use MySQL 5.0.15 I have about 5 billion rows in table X, i create another table Y with the same stucture with X CREATE TABLE Y LIKE X; Both X and Y is the InnoDB table, since i believe that both work on the "row locking" models I try to initiate 2 session First session try to INSERT all

Re: Support between MySQL and PHP

2006-01-30 Thread James Harvard
MySQL versions >= 4.1 use a new, more secure authentication protocol. Probably the version of PHP you are using does not support it. Ah, here it is: http://dev.mysql.com/doc/refman/5.0/en/password-hashing.html HTH, James Harvard At 1:18 pm -0600 29/1/06, Philip R. Thompson wrote: >I just instal