Re: select in Mysql 4.0

2004-07-26 Thread Jocelyn Fournier
Hi, AFAIK, date is *not* a reserved keyword, not need to backtick it :) Regards, Jocelyn Fournier www.presence-pc.com - Original Message - From: "Michael Stassen" <[EMAIL PROTECTED]> To: "fgmmoribe" <[EMAIL PROTECTED]> Cc: "mysql" <[EMAIL PROTECTED]> Sent: Tuesday, July 27, 2004 7:11

ANN: EasySQL 0.0.1

2004-07-26 Thread Jon Frisby
Sorry for the intrusion... EasySQL is a meta-language for MySQL that provides a more sophisticated environment for pure-SQL coding than MySQL provides on its own, eliminating the need for external languages such as Perl in many instances. The first version of EasySQL features iteration across r

nawal lodha..u can easily get this i think...

2004-07-26 Thread Sujay Koduri
> > > hi guys.. > i am new to this mailing list...i am sujay from andale... > > I have a problem in getting multiple records from my store procedure when > I > tried calling it using C API... > > I included the flag CLIENT_MULTI_STATEMENTS..but it is still giving the > same > error.. > > 1

stored procedure not returning multiple rows...

2004-07-26 Thread Sujay Koduri
hi guys.. i am new to this mailing list...i am sujay from andale... I have a problem in getting multiple records from my store procedure when I tried calling it using C API... I included the flag CLIENT_MULTI_STATEMENTS..but it is still giving the same error.. 1296 :SELECT in a stored procedur

Re: How to show comments/annotations in MySQL client output

2004-07-26 Thread Michael Stassen
Richard Mixon (qwest) wrote: I run some mysql command files (just SQL statements in a file I read from standard input) and need to place some annotiations/comments in the output. If I place standard SQL comments ("-- comment text") or MySQL comments ("# comment text") they do not show up in the mys

MYSQL 3.23.52-3 freezing

2004-07-26 Thread Goutam Baul
Hello list, Sorry for the error at the top of my previous posting. I am reposting it. For the past 3 weeks I am facing a problem with one of my servers. I am not very sure if this is something to do with MySQL but my hunch is that it is related to MySQL. The server is running RH 8.0 with

Re: select in Mysql 4.0

2004-07-26 Thread Michael Stassen
fgmmoribe wrote: I have a table like this +-+---+--+-+-++ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-++ | id | int(3)

MYSQL 3.23.52-3 freezing

2004-07-26 Thread Goutam Baul
-Original Message- From: Duncan Hill [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:30 AM To: [EMAIL PROTECTED] Subject:Re: what os to use for mysql on amd64? Hello list, For the past 3 weeks I am facing a problem with one of my servers. I am not very sure if

Re: what os to use for mysql on amd64?

2004-07-26 Thread Duncan Hill
On Tuesday 27 July 2004 05:31, Daniel Kasak wrote: > As you probably know, not all software is perfectly supported on x86-64 > under Linux at the moment. This includes glibc, gcc, binutils, etc. > There are always patches coming in. If you run Gentoo, you have > *incredibly* painless updates to ALL

RE: using mysql in commercial software

2004-07-26 Thread mos
At 04:43 PM 7/26/2004, you wrote: looks like the answer is no. As soon as fee based software touches the mysql install on the PC, the user is obligated to pay the $250. Actually I believe the MySQL 4.x license is more stringent than that. If the MySQL database is distributed within a company for

Re: select * on all current?

2004-07-26 Thread mos
At 10:45 PM 7/26/2004, you wrote: if I understand you correctly, this should do it. select distinct office, max(dateposted) from table group by office Just one more thing. You don't need "distinct" because you are already using "group by". Mike -- MySQL General Mailing List For list archives: ht

Re: what os to use for mysql on amd64?

2004-07-26 Thread Daniel Kasak
bad corn wrote: Hi all, Recently our company has purchased a dual amd64 opteron machine for mysql server purpose. It seems that there are not many os choices for us. Here is the list of OS that we are going to test (in listed order): - debian (amd64) - fedora2 (amd64) - suse (amd64

Re: select * on all current?

2004-07-26 Thread Michael Dykman
if I understand you correctly, this should do it. select distinct office, max(dateposted) from table group by office On Mon, 2004-07-26 at 23:18, Louie Miranda wrote: > Is it also possible to use this? > > http://dev.mysql.com/doc/mysql/en/example-Maximum-row.html > > SELECT MAX(dateposted) FR

what os to use for mysql on amd64?

2004-07-26 Thread bad corn
Hi all, Recently our company has purchased a dual amd64 opteron machine for mysql server purpose. It seems that there are not many os choices for us. Here is the list of OS that we are going to test (in listed order): - debian (amd64) - fedora2 (amd64) - suse (amd64 or 32bit mode) - solari

Re: select * on all current?

2004-07-26 Thread Louie Miranda
Is it also possible to use this? http://dev.mysql.com/doc/mysql/en/example-Maximum-row.html SELECT MAX(dateposted) FROM table; But instead do select all max(dateposted) on office? have tried it, but syntax errors occured. On Tue, 27 Jul 2004 11:13:43 +0800, Louie Miranda <[EMAIL PROTECTED]>

select * on all current?

2004-07-26 Thread Louie Miranda
I have a couple of fields: - office - dateposted - filename now, im having trouble selecting all current "dateposted" per office? i have tried.. sql> select * from datafiles where dateposted current(); And i think its wrong, i could not find how to get it. -- Louie Miranda http://www.axishif

Re: Re: flush table with read lock

2004-07-26 Thread MaFai
Dear Paul DuBois: Good,it can use make a hot backup by this lock. or make a snapshot for replication. Thx At 2004-07-27, 10:13:43 you wrote: At 9:52 +0800 7/27/04, MaFai wrote: > Dear, [EMAIL PROTECTED], > > Does "flush table with read lock " timeout? No, but the lock wil

RE: Replication script pb

2004-07-26 Thread Paul DuBois
At 8:20 -0500 7/26/04, Victor Pendleton wrote: Have you tried using the last insert id function instead? SET @backup_id = last_insert_id() That'll give him the same result. I suspect the problem might be that user variables are not replicated well in MySQL 4.0.x. Philippe, what version of MySQL ar

Re: flush table with read lock

2004-07-26 Thread Paul DuBois
At 9:52 +0800 7/27/04, MaFai wrote: Dear, [EMAIL PROTECTED], Does "flush table with read lock " timeout? No, but the lock will be released if the client connection drops. There is an inactivity timeout on client connections, so after that timeout expires, the server will close the connection. As a

Re: transferring MySQL db from RedHat to Debian

2004-07-26 Thread Paul DuBois
At 17:39 -0700 7/26/04, Shannon R. wrote: hello list! i'll be moving from a RedHat server to a Debian server very soon. despite the different linux distributions, is it ok to transfer my entire mysql database by just copying everything in /var/lib/mysql of the RedHat system to the Debian system?

Re: mysqld_safe

2004-07-26 Thread Paul DuBois
At 16:50 -0600 7/26/04, Levi Campbell wrote: OK, I ran sh mysqld_safe on my computer and it said "Starting mysqld-max deamon.", went to the next line on screen and didn't give me a command line, which leads me to think one of two things happened: 1. the server started successfully. 2. the server

InnoDB maintenance

2004-07-26 Thread Logan, David (SST - Adelaide)
Hi Folks, Being relatively new to InnoDB I have read the books etc. but can't find anything about regular maintenance that may or may not need to be performed on the tablespaces. With other databases I have worked on, a regular dump and load of a database is generally required, on a semi-regular b

RE: SQL for detecting if Column/Index already exists?

2004-07-26 Thread Paul DuBois
At 16:22 -0500 7/26/04, Ghate, Shishir wrote: I looked at the SHOW COLUMNS statement and they have what I want, but I need to condition off them. For example, I don't want to execute an ALTER TABLE command to add a column if that column is already there. I've tried IF DOES NOT EXIST SHOW COLUM

select in Mysql 4.0

2004-07-26 Thread fgmmoribe
I have a table like this +---+-+--+-+-++ | Field | Type | Null | Key | Default | Extra | +---+-+--+-+-++ | id | int(3) | | PRI | NULL | auto_increment | | idTable | int(3) unsig

flush table with read lock

2004-07-26 Thread MaFai
Dear, [EMAIL PROTECTED], Does "flush table with read lock " timeout? E.g: After we excute "flush table with read lock ", All of the table in all of the database can't be updated or delete. But if we doesn't execute 'unlock tables',does it release the lock due to time out? Any idea appreciated.

Re: SHOW INNODB STATUS

2004-07-26 Thread Marc Slemko
On Mon, 26 Jul 2004 18:03:25 -0700, Matt Solnit <[EMAIL PROTECTED]> wrote: > How is it possible to have a hit rate of 1000/1000? Doesn't the buffer > get inOn Mon, 26 Jul 2004 18:03:25 -0700, Matt Solnit <[EMAIL PROTECTED]> wrote: > > How is it possible to have a hit rate of 1000/1000? Doesn't

Re: SHOW INNODB STATUS

2004-07-26 Thread Matt Solnit
Mark, How is it possible to have a hit rate of 1000/1000? Doesn't the buffer get initialized by cache misses? -- Matt <[EMAIL PROTECTED]> Re: INNODB SHOW STATUS From: Marc Slemko (marcsznep.com) Date: Wed Apr 21 2004 - 10:29:44 CDT On Tue, 20 Apr 2004, Emmett Bishop wrote: > Howdy all, >

help query analysis

2004-07-26 Thread Jacob, Raymond A Jr
I am trying to analyze a query that is taking forever. I am new to this so or rather desperate. I would assume that my query would be faster, if the event id (*.cid) Primary key were used to search for rows in the iphdr table with the same event id, but I don't think that is happening. Could some

transferring MySQL db from RedHat to Debian

2004-07-26 Thread Shannon R.
hello list! i'll be moving from a RedHat server to a Debian server very soon. despite the different linux distributions, is it ok to transfer my entire mysql database by just copying everything in /var/lib/mysql of the RedHat system to the Debian system? has anyone tried this before? the r

Re: Re[2]: nested sets - Perhaps a solution!

2004-07-26 Thread Alexander Newald
[how to store userpermissions in a tree in mysql] Hi, after a long time of try and error I have this as a result: mysql> select * from node; +-+-+-+-+-+--+--+--+ | node_id | root_id | payload | lft | rgt | a| c| d| +-+-+

mysqld_safe

2004-07-26 Thread Levi Campbell
OK, I ran sh mysqld_safe on my computer and it said "Starting mysqld-max deamon.", went to the next line on screen and didn't give me a command line, which leads me to think one of two things happened: 1. the server started successfully. 2. the server startup faild and locked up. I'm hoping it i

Re: mysql libs and multiple hostnames

2004-07-26 Thread Jeremy Zawodny
On Mon, Jul 26, 2004 at 04:09:51PM -0400, Charles Sprickman wrote: > > I have a quick question about how programs linked against the mysql C > libraries handle the following: > > -assume three mysql hosts, say 10.0.0.2, 10.0.0.3, and 10.0.0.4 > -assume a dns name "db.example.com" that returns the

Re: Select statement inbetween unix timestamp ranges

2004-07-26 Thread Keith Ivey
Craig Hibbert wrote: SELECT FROM_UNIXTIME(time) FROM srvlog WHERE FROM_UNIXTIME(time >= '1080948600') AND FROM_UNIXTIME(time <= '1080997876'); Why do you have FROM_UNIXTIME() in the WHERE clause? You said the "time" column was already in Unix time, and regardless, you're passing the function the

Select statement inbetween unix timestamp ranges

2004-07-26 Thread Craig Hibbert
Hello, I have been pulling my hair out trying to get a SELECT statement to work using a range of Unix timestamps as the criteria. MySQL Version 4.0 SELECT FROM_UNIXTIME(time) FROM srvlog WHERE FROM_UNIXTIME(time >= '1080948600') AND FROM_UNIXTIME(time <= '1080997876'); I also tried

RE: using mysql in commercial software

2004-07-26 Thread Steve Richter
looks like the answer is no. As soon as fee based software touches the mysql install on the PC, the user is obligated to pay the $250. At least I guess it is the user who has to pay. Because once you pay for the mysql install, you can use as many fee based applications as you want. -Steve ---

How to show comments/annotations in MySQL client output

2004-07-26 Thread Richard Mixon (qwest)
I run some mysql command files (just SQL statements in a file I read from standard input) and need to place some annotiations/comments in the output. If I place standard SQL comments ("-- comment text") or MySQL comments ("# comment text") they do not show up in the mysql client output. Well, in a

Re: File size limits with mysql 4.1

2004-07-26 Thread Michael Dykman
I apologize for my skepticism of 15 minutes ago. I finally _read_ http://dev.mysql.com/doc/mysql/en/Table_size.html carefully, and indeed your suggestion is dead on. thank you again. On Mon, 2004-07-26 at 14:19, Paul DuBois wrote: > At 12:48 -0400 7/26/04, Michael Dykman wrote: > >I am using a d

RE: SQL for detecting if Column/Index already exists?

2004-07-26 Thread Ghate, Shishir
I looked at the SHOW COLUMNS statement and they have what I want, but I need to condition off them. For example, I don't want to execute an ALTER TABLE command to add a column if that column is already there. I've tried IF DOES NOT EXIST SHOW COLUMN ... followed by the ALTER TABLE command, bu

Re: File size limits with mysql 4.1

2004-07-26 Thread Michael Dykman
thank you for the suggestion, I will give that a try. I thought it suspicious that the table stopped receiving data at 2 bytes under the natural 4G limit (8 byte int) which was standard under 3.22. As I said, I am using a development release and I have found 1 or 2 other regression errors along t

Re: why use MySql instead of Firebird or SQL Server express? (long)

2004-07-26 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martijn Tonies wrote: [snip] | SQLExpress is not MSDE, it looks like it though. SQLExpress | has a 4Gb limit/database and I don't recall a user limit, but a | concurrent-load limit of 5. That is, many can connect, but only | 5 concurrent batches (select

Re: mysql-4.0.20 configure fails mac os x 10.3.1 client

2004-07-26 Thread Ron Phelps
I executed the following preparation work: 1. Upgraded Mac OS X 10.3.1 to 10.3.4 2. Installed two additional security updates 3. Examined the status of the Xcode packages pre-installed on the box Documentation states it is Xcode 1.0 for Mac OS 10.3 Panther 4. I ran all installers except, CHUD, Dev

mysql libs and multiple hostnames

2004-07-26 Thread Charles Sprickman
Sorry to re-send, but I lost some mail and thought perhaps this was answered and I missed it, but looking at the archives I don't see any replies. Thanks! Charles I have a quick question about how programs linked against the mysql C libraries handle the following: -assume three mysql hosts, say

Re: why use MySql instead of Firebird or SQL Server express? (long)

2004-07-26 Thread Martijn Tonies
Hi Steve, > In light of the licensing restrictions on using MySql in a commercial > package, why would MySql be prefered over Firebird or SQL Server 2005 > express edition. Both appear to be no charge to redistribute compared to the > $250 for MySql. > > http://firebird.sourceforge.net/ > > http:/

Re: MySQL book

2004-07-26 Thread Gerald Taylor
I totally recommend Paul Dubois's book. Excellent book I own the first edition. I bet the second edition is just as good and more up to date. Paul DuBois wrote: At 1:55 +0200 7/26/04, Schalk Neethling wrote: Can anyone suggest o great book to learn MySQL inside out? I am thinking of getting: *MyS

RE: using mysql in commercial software

2004-07-26 Thread SGreen
I guess that would depend on what kind of license your database connection libraries come with. ** DISCLAIMER ** I AM NOT A LAWYER and THIS IS *NOT* LEGAL ADVICE. **DISCLAIMER ** Whenever I ask myself "can I sell what I just created and keep my source code hidden", I rely on several factors

Re: Re[2]: nested sets

2004-07-26 Thread Alexander Newald
[Aman's view of my problem] Hi, I think you know what my problem is. My "solution" so far is (from another mail): -- snip -- The main problem I have to do the "rollback". A 2nd table is no option because it might be possible that another users rights get be change before the rights of the firs

Re: SQL for detecting if Column/Index already exists?

2004-07-26 Thread Paul DuBois
At 14:08 -0500 7/26/04, Ghate, Shishir wrote: Hello, I am trying to write a db creation script that will create a database as a well as repair an existing database. What I can't seem to find is a set of key words that will allow me to detect if a column or index already exists in a table and th

ERROR 1062: Duplicate entry

2004-07-26 Thread Eli Shemer
Hey, I am trying to create an index on a varchar column, but I am getting a suspicious error I am unable to overcome. Indeed there are duplicated rows but since there is no constraint nor a key in the table, I do not see why this error is generated. I would appreciate some help. Here are the d

SQL for detecting if Column/Index already exists?

2004-07-26 Thread Ghate, Shishir
Hello, I am trying to write a db creation script that will create a database as a well as repair an existing database. What I can't seem to find is a set of key words that will allow me to detect if a column or index already exists in a table and thus skip the creation of the column or index.

RE: using mysql in commercial software

2004-07-26 Thread Laercio Xisto Braga Cavalcanti
Hi all, If I write a comercial software that allow my customer at instalation time to select between mysql, interbase or other data base is it legal? Regards, Laercio. -Original Message- From: gerald_clark [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 26 de julho de 2004 15:26 To: St

Re: why use MySql instead of Firebird or SQL Server express?

2004-07-26 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: |>FirebirdSQL is an excellent project, but as far as I know there is not a |>single organization that stands behind it providing support, training, |>etc. as MySQL AB does with the MySQL product line. | | | Might want to take a

Re: Slow server - any idea?

2004-07-26 Thread Julien Lavigne du Cadet
I've optimized the main tables (the forums one and a few others) a few days ago. About index cardinality, I don't know what to tell you. For a few tables it is high, like for the vbulletin postindex (higher than 11 000 000) but it's absolutely normal for such a forum. And about explain, we've got

Re: why use MySql instead of Firebird or SQL Server express?

2004-07-26 Thread justin
> FirebirdSQL is an excellent project, but as far as I know there is not a > single organization that stands behind it providing support, training, > etc. as MySQL AB does with the MySQL product line. Might want to take a look at http://www.ibphoenix.com/ Training is pretty pricey, but it's there

Re: using mysql in commercial software

2004-07-26 Thread gerald_clark
Steve Richter wrote: -Original Message- From: Michael Abbott [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 11:28 AM To: [EMAIL PROTECTED] Subject: RE: using mysql in commercial software This may not be strictly legal, but you could have the end user download MySQL.. to run

RE: run-all-test

2004-07-26 Thread Christopher M. DeBracy
This is a follow-up to my original post from yesterday. I've narrowed down the problem to the "test-connect" script. C:\mysql\bench>perl test-connect --user=root --password=tops3cr3t Testing server 'MySQL 4.0.20a nt' at 2004-07-26 13:01:26 Testing the speed of connecting to the server and sending

Re: File size limits with mysql 4.1

2004-07-26 Thread Paul DuBois
At 12:48 -0400 7/26/04, Michael Dykman wrote: I am using a development build of 4.1.3 (the last 4.1.3 release I think; mysql-4.1.3-beta-nightly-20040628) so I suppose I have this coming, but here goes: As I am running on RH Enterprise Server 3 with a Pentium Xeon (32-bit) According to the documenta

Re: Slow Insert into MyISAM table from Oracle Stored Procedure

2004-07-26 Thread Bob . Runion
Note: I installed MySQL on my labtop (a Windows XP machine) which is located at the same site as the Oracle server, just to compare the insert times with the remote MySQL database. Inserts which were taking over 4 minutes were now completing in 90 seconds or less. Approximately 1 second per

Re: why use MySql instead of Firebird or SQL Server express?

2004-07-26 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steve Richter wrote: | In light of the licensing restrictions on using MySql in a commercial | package, why would MySql be prefered over Firebird or SQL Server 2005 | express edition. Both appear to be no charge to redistribute compared to the | $250 fo

Re: File size limits with mysql 4.1

2004-07-26 Thread Aman Raheja
You must be getting an error code when inserting now. If that is related to index file size (that's what I had) . You can do ALTER TABLE MAX_ROWS= On Mon, 2004-07-26 at 11:48, Michael Dykman wrote: > I am using a development build of 4.1.3 (the last 4.1.3 release I think; > mysql-4.1.3-beta-nigh

Re: INSERT if record NOT EXISTS

2004-07-26 Thread Marc Slemko
On Mon, 26 Jul 2004 17:47:37 +0100, Adaikalavan Ramasamy <[EMAIL PROTECTED]> wrote: > This seems more like the solution I want. I am using perl-DBI and when > there is an error (i.e. duplicate insert), the rest of the scrip it not > executed. But this is gives me the following error. What am I doin

Re: Multiple inserts in one statement

2004-07-26 Thread Paul DuBois
At 14:32 -0700 7/22/04, Scott Haneda wrote: I was just reading a forum post on mysql, someone said it was possible in mysql 4 to insert data into more than one table at once. Is this possible, if so, where in the docs can I see a example of this? Scott, Perhaps you could ask "someone" to provide a

Re: how to deal with a string of categories

2004-07-26 Thread SGreen
http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html Is where you will find the GROUP_CONCAT function in the manual. Yours, Shawn Green Database Administrator Unimin Corporation - Spruce Pine "Mojtaba Faridzad" <[EMAIL PROTECTED]> wrote on 07/26/2004 11:34:30 AM: > Thank Martijn, Brent, a

Re: why use MySql instead of Firebird or SQL Server express?

2004-07-26 Thread Ruben
Mysql is easier to install than Firebird and runs in more Operative Systems than SQL Server. Steve Richter wrote: In light of the licensing restrictions on using MySql in a commercial package, why would MySql be prefered over Firebird or SQL Server 2005 express edition. Both appear to be no charg

Re: INSERT if record NOT EXISTS

2004-07-26 Thread Alec . Cawley
Adaikalavan Ramasamy <[EMAIL PROTECTED]> wrote on 26/07/2004 16:31:44: > But I have another related question. How do I write an IF ELSE command > with MYSQL. In this context, I want it to return myID if the record > already exists, otherwise insert into database. > > This naive syntax does not w

Re: mysqldump question

2004-07-26 Thread Paul DuBois
At 20:58 -0600 7/21/04, Jim McAtee wrote: (Apologies in advance for the crossposting, but I asked the same questions on the MySQL Windows list and didn't get any replies) I need a simple backup mechanism for MySQL (3.2x) that will backup all databases on a server. Something that can be run from a

Re: INSERT if record NOT EXISTS

2004-07-26 Thread Adaikalavan Ramasamy
Yes, this does what I want and does not produce an error (which caused the remaining MYSQL syntax not to be executed). The firstname, lastname was for example only. In my problem, these are two different identifiers so I am not worried about multiple dual identifiers. Thanks to Keith Ivey, Alec Ca

Re: INSERT if record NOT EXISTS

2004-07-26 Thread Keith Ivey
Adaikalavan Ramasamy wrote: This naive syntax does not work : IF EXISTS (SELECT myID FROM tb WHERE firstname='Jack' AND lastname='Doe') ELSE (INSERT INTO tb(firstname, lastname) VALUES ('Jack', 'Doe'); Assuming you have the unique index on (firstname, lastname), just do INSERT IGNORE INTO tb (fir

RE: Errcode: 27

2004-07-26 Thread J S
Does anyone know what goes on (system wise) during the CREATE INDEX ? I can see it's copying the table file, what then though? Hi, I'm stuck on this really badly. Can anyone help me out please? Thanks, JS. I tried running the "create index" again using --verbose but this is all I got: ERROR 3 a

File size limits with mysql 4.1

2004-07-26 Thread Michael Dykman
I am using a development build of 4.1.3 (the last 4.1.3 release I think; mysql-4.1.3-beta-nightly-20040628) so I suppose I have this coming, but here goes: As I am running on RH Enterprise Server 3 with a Pentium Xeon (32-bit) According to the documentation, for a 32 bit processor, I should be abl

Re: INSERT if record NOT EXISTS

2004-07-26 Thread Adaikalavan Ramasamy
This seems more like the solution I want. I am using perl-DBI and when there is an error (i.e. duplicate insert), the rest of the scrip it not executed. But this is gives me the following error. What am I doing wrong ? mysql> desc tb; +---+-+--+-+-+-

Re: how to deal with a string of categories

2004-07-26 Thread Mojtaba Faridzad
Thank Martijn, Brent, and Shawn so much! I did not know about GROUP_CONCAT() funtion. I checked MySQL document page but just under "string function" in User Comments section there was an example of using it. Shawn, where can I find the syntax of this command? it looks like we can pass some par

Re: INSERT if record NOT EXISTS

2004-07-26 Thread Michael Dykman
from http://dev.mysql.com/doc/mysql/en/INSERT.html: 14.1.4 INSERT Syntax INSERT [LOW_PRIORITY | DELAYED] [IGNORE] [INTO] tbl_name [(col_name,...)] VALUES ({expr | DEFAULT},...),(...),... [ ON DUPLICATE KEY UPDATE col_name=expr, ... ] ... If you specify the ON DUPLICATE KEY UPDATE claus

Re: problems transferring database

2004-07-26 Thread Egor Egorov
james patrick <[EMAIL PROTECTED]> wrote: > I previously had a server runnning RH 7.3, cPanel 9.41 and MySQL > 4.0.20. I'm moving to a different server running Fedora 1, DirectAdmin > and MySQL 4.0.17. > I have a large database (200mb) and I'm trying to move it over. 200mb is not a large database

Re: mysqldump issue

2004-07-26 Thread Egor Egorov
Ginger Cheng <[EMAIL PROTECTED]> wrote: > If a table has a column defined as 'float not null' and the corresponding > txt file used to load it have sth like 'nan' for the column, although > giving warnings, the record will be loaded and the column looks like 'nan' > by using mysqlimport

Re: Re[2]: nested sets

2004-07-26 Thread Aman Raheja
On Mon, 2004-07-26 at 10:24, DebugasRu wrote: > Hello Aman, > > Monday, July 26, 2004, 6:03:07 PM, you wrote: > > >> Hello, > >> > >> I have a question related to nested sets: > >> > >> On my website a user should be able to create subusers and give them the > >> rights to add/change/delete sub

Re: mysqld being killed by VM

2004-07-26 Thread Egor Egorov
Michael Gale <[EMAIL PROTECTED]> wrote: Please install MySQL official binary downloaded from http://www.mysql.com/ and check if the problem is gone. It very much looks like some build issues. Also please check that MySQL has enough memory to run - i.e. the key_buffer variable is reasonably high

why use MySql instead of Firebird or SQL Server express?

2004-07-26 Thread Steve Richter
In light of the licensing restrictions on using MySql in a commercial package, why would MySql be prefered over Firebird or SQL Server 2005 express edition. Both appear to be no charge to redistribute compared to the $250 for MySql. http://firebird.sourceforge.net/ http://lab.msdn.microsoft.com/

Re[2]: nested sets

2004-07-26 Thread DebugasRu
Hello Aman, Monday, July 26, 2004, 6:03:07 PM, you wrote: >> Hello, >> >> I have a question related to nested sets: >> >> On my website a user should be able to create subusers and give them the >> rights to add/change/delete subsites of the users website. If I remove one >> or more rights to a

Re: extracting substring from text blob during query

2004-07-26 Thread Egor Egorov
Redmond Militante <[EMAIL PROTECTED]> wrote: > i have a large text blog that i want to extract strings out of.=20 > the large text blob See http://dev.mysql.com/doc/mysql/en/String_functions.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is spo

Re: Multiple inserts in one statement

2004-07-26 Thread Egor Egorov
Scott Haneda <[EMAIL PROTECTED]> wrote: > I was just reading a forum post on mysql, someone said it was possible in > mysql 4 to insert data into more than one table at once. Is this possible, > if so, where in the docs can I see a example of this? Not possible. What is possible is inserting sev

Re: mysqldump question

2004-07-26 Thread Egor Egorov
"Jim McAtee" <[EMAIL PROTECTED]> wrote: > Can I easily restore individual databases and/or individual tables from a > backup made with mysqldump? Yes if you will individually dump the tables. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponso

Re: Cygwin Mysql No Response

2004-07-26 Thread Egor Egorov
Will Martell <[EMAIL PROTECTED]> wrote: Not a MySQL issue. MySQL is a standalone native Win32 application that does not need Cygwin. The same applies to MySQL command-line client. > Thank you for reading this email. > > I have the following Configuration > Windows 2000 Server > MySQL Win32 Bin

Re: Update on installing mysql on linux

2004-07-26 Thread Egor Egorov
"Levi Campbell" <[EMAIL PROTECTED]> wrote: > Okay, I got the RPM package installed but when I use rpm -I = > mysql-server-4.0.20-0.i386.rpm, I am told that I need several files, = > most of which I can't find in the Debian package library. I need the = > following files: /usr/bin/perl, sh-utils an

Re: Tuning MySQL for Large Database

2004-07-26 Thread Egor Egorov
"Michael Sleman" <[EMAIL PROTECTED]> wrote: > key_buffer = 384M Try to enlarge this up to, say, 1G and check it out how that helps. > sort_buffer_size = 2M You may want to enlarge this as well. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is s

Re: Re[2]: nested sets

2004-07-26 Thread Alexander Newald
> Hello Aman, > [..] > > I think he was talking about user roles. > one creates a role and then assigns that role to the users. > When one changes the role rights then automatically users' rights > change according to the roles they have. > The main problem I have to do the "rollback". A 2nd tab

Re: after upgrade unicode characters changed to question marks

2004-07-26 Thread Egor Egorov
"Stefan Klopp" <[EMAIL PROTECTED]> wrote: > We recently upgraded our mysql server from 3.23 to 4.0.18 and have found > that all of our Unicode characters are now being displayed as question marks > (?). Anyway this only happens when viewing over the web as when we view via > the shell mysql we can

RE: using mysql in commercial software

2004-07-26 Thread Steve Richter
-Original Message- From: Michael Abbott [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 11:28 AM To: [EMAIL PROTECTED] Subject: RE: using mysql in commercial software >This may not be strictly legal, but you could have the end user download >MySQL.. to run with your software...

Re: Splitting data across tables

2004-07-26 Thread Egor Egorov
"Andrew Hill" <[EMAIL PROTECTED]> wrote: > Perhaps it would be better to insert the timestamp, rather than letting > MySQL set it. Sure. This gives consistency in your situation. > Or, is there perhaps a way to let MySQL select which table > to perform the insert into, based on the time? No.

Re: using mysql in commercial software

2004-07-26 Thread Aman Raheja
As I understand from the following link http://dev.mysql.com/doc/mysql/en/Using_the_MySQL_software_under_a_commercial_license.html You need to buy a commercial license if the software you are developing is not to be registered under GPL. Aman On Mon, 2004-07-26 at 09:55, Issac Goldstand wrote: > P

Re: ARGH - Mysql won't stop eating RAM and finally it SEGV's

2004-07-26 Thread Egor Egorov
Richard Clarke <[EMAIL PROTECTED]> wrote: > It is the proper binary from mysql.com. > mysql-standard-4.1.3-beta-pc-linux-i686.tar.gz > > I have also filed a bug report for this problem. #4673 > There is some extra information in the bug report describing what my > application does. Okay, thank yo

Re: INSERT if record NOT EXISTS

2004-07-26 Thread Adaikalavan Ramasamy
Thanks Alec ! This works wonderfully. But I have another related question. How do I write an IF ELSE command with MYSQL. In this context, I want it to return myID if the record already exists, otherwise insert into database. This naive syntax does not work : IF EXISTS (SELECT myID FROM tb WHERE f

Re: INSERT if record NOT EXISTS

2004-07-26 Thread gerald_clark
Your model is flawed. My son and I have the same first and last names. Therefore, we could not be users on your system. Adaikalavan Ramasamy wrote: I am creating a small database that keeps track of users and assigns them a unique user ID. The problem is that sometimes the users might request to

TMPDIR on a 4.0.20.

2004-07-26 Thread RV Tec
Hi, I'm using MySQL 4.0.20 on a fairly loaded server, running OpenBSD 3.5 (P4 3Gz, 2GB RAM, SCSI U160 36GB disks), and the database itself is around 8GB. There are a couple of large tables (>2.000.000 rows), but most of them are small. The data is retrieved intensively, so we can build reports an

Re: INSERT if record NOT EXISTS

2004-07-26 Thread Alec . Cawley
Adaikalavan Ramasamy <[EMAIL PROTECTED]> wrote on 26/07/2004 16:05:23: > I am creating a small database that keeps track of users and assigns > them a unique user ID. > > The problem is that sometimes the users might request to be added more > than once (i.e. click on the submit button multiple

Re: how to deal with a string of categories

2004-07-26 Thread SGreen
May I suggest a design change as a solution? I would suggest that you should create a user/category table to replace your "catstr" field: CREATE TABLE user_category ( user_Id int not null, category_Code char(1) not null UNIQUE (user_Id, category_Code) ) There will be one record in the user_categ

Re: how to deal with a string of categories

2004-07-26 Thread Brent Baisley
You should never create multi-purpose fields that you will need to use to reference other data, which is what you did here. The database can't use an index because the "codes" are not in set positions. You need to create a table for linking the categories with "mytable", since you are trying to

INSERT if record NOT EXISTS

2004-07-26 Thread Adaikalavan Ramasamy
I am creating a small database that keeps track of users and assigns them a unique user ID. The problem is that sometimes the users might request to be added more than once (i.e. click on the submit button multiple times). Therefore I only want to add users if their details (here defined by both

Re: nested sets

2004-07-26 Thread Aman Raheja
Hi Though I would like to look up a way to implement what you want in MySQL, one thing was indicative and I wanted to point out. If, say there was a way, you could remove the c and d rights from subsequent users by removing it from User2, I think you are talking about some kind of history retentio

Re: how to deal with a string of categories

2004-07-26 Thread Martijn Tonies
Hi, > I'd like to know how you guys write SQL command for this problem. there are > some categories which I give them "A", "B", ... and I have a string field > (catstr) with 10 characters in "mytable" to keep selected categories in a > record. when user selects "C", "G", "K", I keep "CGK" in "cats

Re: table_cache size for large value in opened_tables

2004-07-26 Thread Ken Menzel
Hi Terence, > Hi all, > > My system reports: > > Open_tables 512 > Opened_tables 24,429 > > The docs say that if the latter is high I should increase the table > cache size. (currently at 512) Looks like you should do that. > > How does one decide what size to increase it to? And is there a prob

  1   2   >