Re: date problem
-do you have any index covering this query? -this is not a good practice to have function call(s) in the where clause, since mysql will make the fucntion call for every rows scanned. select count(*) as c from users_table where user_regdate > "2002-06-01 00:00:00" -furthermore, in the where clause, >= is always better than >. select count(*) as c from users_table where user_regdate >= "2002-06-01 00:00:01" andy wrote: > > Hi there, > > I would like to count the users out of a mysql db who registered after a > certain date. > > The column I have in the db is a char and I do not want to change this > anymore. > This is how a typical entry looks like: May 29, 2002 > > This is how I tryed it: > > // while '10...' is unix timestamp june 1, 02 > SELECT COUNT(*) AS c > FROM users_table > WHERE UNIX_TIMESTAMP( user_regdate ) > '1022882400' > > Thanx for any help on that, > > andy > > query > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Sammy Lau mailto: [EMAIL PROTECTED] - Tell me what you want and I'll tell you how you can live without it. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
date problem
Hi there, I would like to count the users out of a mysql db who registered after a certain date. The column I have in the db is a char and I do not want to change this anymore. This is how a typical entry looks like: May 29, 2002 This is how I tryed it: // while '10...' is unix timestamp june 1, 02 SELECT COUNT(*) AS c FROM users_table WHERE UNIX_TIMESTAMP( user_regdate ) > '1022882400' Thanx for any help on that, andy query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Select DATE, help ...
On Wednesday, June 5, 2002, at 10:03 PM, [EMAIL PROTECTED] wrote: > Your message cannot be posted because it appears to be either spam or > simply off topic to our filter. To bypass the filter you must include > one of the following words in your message: > > sql,query > > If you just reply to this message, and include the entire text of it in > the > reply, your reply will go through. However, you should > first review the text of the message to make sure it has something to do > with MySQL. Just typing the word MySQL once will be sufficient, for > example. > > You have written the following: > > Hello, > I have a table with 2 columns StartDate and EndDate. > > I can't seem to figure out how to write a select statement that will > tell me if the date I'm searching on is between the Start and the End > date. > > Like, I want to know if 7/4/2002 is between 6/1/2002 (startDate) and > 8/1/2002 (endDate). > > > Thanks, > > - Tom > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL or MS Access ?
On Wed, Jun 05, 2002 at 10:28:15PM -, Jay Liew wrote: > Hello everyone, > > I am new to database operations, and I was wondering if there were any > advantages or using MS Access to MySQL. Don't get me wrong, but I would > prefer Open Source over proprietary, but this is a mission-critical > commercial purpose database. Any comments, would be much appreciated. Thank you. I use both Access and MySQL, and they both have their good points and bad points. If you are choosing between them, it's not enough to say "mission critical"; you have to specify what you are doing that's mission critical and then pick the DBMS accordingly. Actually, your choice is between Jet and MySQL, not Access and MySQL. Access ships with the Jet database engine and uses it by default, but you can design an Access front end for a MySQL backend. I've done this myself and it's not hard. If you are serious about getting information, you should be more specific about what you plan to do, and post your question in a newsgroup that deals with Access. Some Access developers claim to have created Jet-based apps that supported over one hundred users without problems. None of my Access apps have been used by more than twenty users, but I haven't had any problems at that level of use, and one of these was client/server over a really terrible unreliable network. After a year of use, with about twenty users who tended to all use the app at the same time, the client reported no problems. Access gets a bad name because: 1) MS wants to sell SQL Server licences and makes Jet sound less capable than it really is 2) Access has features that allow people who know very little about databases and programming to create databases that can be shared by a small number of people. But using these features tends to limit the number of people who can use the database without having problems. And developers who are new to Access use these features. The two obvious differences between Jet and MySQL are 1) Administration: You can install a Jet database for a client that has no one on staff who knows anything about databases. If the app is properly designed, you won't have to make very many visits to deal with problems. With MySQL, a certain minimal level of in-house DBA knowledge is necessary. 2) Concurrent Users: Depending on circumstances, both Jet and MySQL vary in the number of users they can handle, but under all circumstances, Jet has a lower limit. Bob Hall -- Access Hamsters: Free tools for users, DBAs, and developers. Source Code: More of the same, with source code. SQL: Solutions, troubleshooting tips, etc. for Jet & MySQL http://users.starpower.net/rjhalljr/Serve - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: processlist
Hi, Is this mysqld.log file created automatically or we need to do some settings in my.cnf to enable this logging of mysqld? Thanx in advance.. Ritu On Wed, 5 Jun 2002, Eivind A. Sivertsen wrote: > You can also tail -f the logfile of mysqld... > > >> tail -f /var/log/mysqld.log > > ...or something like that... > > Eivind > > > > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Attn: MySQL AB: we need 3.23.5x NOW !
On Wed, Jun 05, 2002 at 07:39:47PM -0500, Cal Evans wrote: > > If he build using 2.9x would it be stable? (I'm assuming that they > are using gcc 3.x from your post) Right on both counts. -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.51: up 7 days, processed 169,381,054 queries (273/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql newbie show table question
Hrm. Closest I can think of is EXPLAIN SELECT * FROM demo WHERE name LIKE 'user_access'; I think this is what you mean. Adam Hooper [EMAIL PROTECTED] On Fri, 31 May 2002 08:44:49 -0700 marc malacarme <[EMAIL PROTECTED]> wrote: > I can¹t seem to make any of the describe or show queries work when I apply a > search statement: > Query=show table status from demo; > Works fine. Now I¹m trying to get info from only one table: > Query=show table status from demo where name like "user_access"; > Does no work. > > Thank You > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Installation problems on AIX 4.3.3
I am having a problem installing version 3.23.50 on AIX 4.3.3. When I execute mysql_install_db or try to start mysqld I get errors like 0509-036 Cannot load program ./bin/my_print_defaults because of the following errors: 0509-130 Symbol resolution failed for my_print_defaults because: 0509-136 Symbol stpcpy (number 45) is not exported from dependent module /usr/lib/libc.a(shr.o) 0509-136 Symbol strnlen (number 46) is not exported from dependent module /usr/lib/libc.a(shr.o) I have chased through the mail archives and found messages with errors like this but found no fix but to try 2.23.50 (the one I am loading). Has this been resolved? Any help would be greatly appreciated. Morris Ford __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SQLPrepare problems
Hello everyone, I´m writing a VC++ 6.0 App that among many other things manages a simple mySQL database, using myODBC v3.51. Righ now I´m trying to send a "test" simple statement to the database, using SQLPrepare: retcode = SQLPrepare(hstmt,"INSERT INTO ger(manuf,model,location) VALUES(?,?,?)", SQL_NTS); This is quite similar to one of the myODBC manual´s example. However, the VC++ 6.0 compiler gives me the following error: "error C2664: 'SQLPrepare' : cannot convert parameter 2 from 'char [52]' to 'unsigned char *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast" I tried to typecast the "INSERT.. " string with (unsigned char*): retcode = SQLPrepare(hstmt,(unsigned char*)"INSERT INTO ger(manuf,model,location) VALUES(?,?,?)", SQL_NTS); Which seemed to be fine, but despite compiling and linking alright, it really doesnt work and retcode returns an error. I know that myODBC is working because I already tested Direct Execution (SQLExecDirect) with sucess. So, what may I be doing wrong? Thanks in advance, Mateus Begossi - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Problems starting MySQL as a Service for all users
I've installed MySQL as a service using mysqld-nt --install on W2K. No problem there, says "service successfully installed". BUT, when I try to log off the admin account and on to the regular "power user" account MySQL will not start automagically and cannot be started manually. Pop back over to the admin account and MySQL acts like nothing was ever wrong. Is this an issue that can be overcome by manually installing MySQL as a service instead of using the above? And how do you accomplish that? If you know or have heard of this before please help me out; I'd really like to have MySQL running for all users (that would enable the Apache-based site I'm running on the same box to access the database at all times). Thanks! Kirk - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Attn: MySQL AB: we need 3.23.5x NOW !
At 05:18 PM 6/5/2002 -0700, you wrote: >On Wed, Jun 05, 2002 at 04:52:39PM -0700, j.random.programmer wrote: > > > We're running a custom-compiled 3.23.51 (or .52-pre, > > > [..] > > > Why not build your own? > > > > Hmm. The latest source on the pre-release page is 3.23.50 and it's > > not clear whether the "stability" issue is a bug in the code, the > > compiler or the runtime libs. > >I'm building from their source tree. And the stability issue is >specific to Linux only. It's becuase they're trying a new version of >glibc (and maybe gcc?). It has nothing to do with the source itself. > >Jeremy >-- >Jeremy D. Zawodny, <[EMAIL PROTECTED]> >Technical Yahoo - Yahoo Finance >Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 > >MySQL 3.23.51: up 7 days, processed 166,285,131 queries (274/sec. avg) > >- >Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail <[EMAIL PROTECTED]> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Attn: MySQL AB: we need 3.23.5x NOW !
If he build using 2.9x would it be stable? (I'm assuming that they are using gcc 3.x from your post) =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 7:19 PM To: j.random.programmer Cc: [EMAIL PROTECTED] Subject: Re: Attn: MySQL AB: we need 3.23.5x NOW ! On Wed, Jun 05, 2002 at 04:52:39PM -0700, j.random.programmer wrote: > > We're running a custom-compiled 3.23.51 (or .52-pre, > > [..] > > Why not build your own? > > Hmm. The latest source on the pre-release page is 3.23.50 and it's > not clear whether the "stability" issue is a bug in the code, the > compiler or the runtime libs. I'm building from their source tree. And the stability issue is specific to Linux only. It's becuase they're trying a new version of glibc (and maybe gcc?). It has nothing to do with the source itself. Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.51: up 7 days, processed 166,285,131 queries (274/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Attn: MySQL AB: we need 3.23.5x NOW !
On Wed, Jun 05, 2002 at 04:52:39PM -0700, j.random.programmer wrote: > > We're running a custom-compiled 3.23.51 (or .52-pre, > > [..] > > Why not build your own? > > Hmm. The latest source on the pre-release page is 3.23.50 and it's > not clear whether the "stability" issue is a bug in the code, the > compiler or the runtime libs. I'm building from their source tree. And the stability issue is specific to Linux only. It's becuase they're trying a new version of glibc (and maybe gcc?). It has nothing to do with the source itself. Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.51: up 7 days, processed 166,285,131 queries (274/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Attn: MySQL AB: we need 3.23.5x NOW !
> We're running a custom-compiled 3.23.51 (or .52-pre, > [..] > Why not build your own? Hmm. The latest source on the pre-release page is 3.23.50 and it's not clear whether the "stability" issue is a bug in the code, the compiler or the runtime libs. > I can send you a binary that works for us. But > you'd really need to do some testing locally. Very nice of you to offer. I may have to take you up on it if MySQL AB does not release a stable version in the next month or so. Right now, I've already deployed with 3.23.50 "unstable". I'll wait another month and see what happens. > I'm guessing that you're not a paid support customer > of MySQL? Nope. I'm quite cheap that way :-] Best regards, --j __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MySQL or MS Access ?
Ok, without ridiculing you in public (because that's not my purpose) I've got to question your use of mission critical and MS Access in the same statement. Access is a desktop database and for that it does ok, ass long as you don't want it to get in a hurry to do anything. (The JET engine is horribly bloated) Access is an acceptable report writer for real databases as long as speed and reliability are not important. If you have to have mission critical then your choices are MS SQL and MySQL. That's a better comparison. And one that has been made many times (including once by myself) on this list. In short, if you can afford to pay the MS tax, don't mind paying the MS tax and don't mind the fact that you get the SAME level of accountability as you do with MySQL (Read the EULA!) then go with MS SQL. If it's mission critical and you value your job, stop looking at MS Access. If you feel you need support beyond what this group can give you (nothing to be ashamed of) then AB MySql has some very reasonably priced support packages. HTH, again, said with all the politeness you cans tuff into an email envelope. :) =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Jay Liew [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 5:28 PM To: [EMAIL PROTECTED] Subject: MySQL or MS Access ? Hello everyone, I am new to database operations, and I was wondering if there were any advantages or using MS Access to MySQL. Don't get me wrong, but I would prefer Open Source over proprietary, but this is a mission-critical commercial purpose database. Any comments, would be much appreciated. Thank you. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Looking for some help
Sorry, I think I confused you. A batch file, calling mysqlhotcopy with the proper parameters is the way I would go. If I had to use Win2k, I'd use the Task Scheduler to run the batch file. As to the parameters for myslqhotcopy, I don't know. I would suggest you read the help file or type mysqlhotcopy without any parameters and see if it gives you some help. Shouldn't be too hard to figure out. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Mark Stringham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 4:27 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Looking for some help What would you suggest? Mark At Wednesday, 5 June 2002, "Cal Evans" <[EMAIL PROTECTED]> wrote: >No, a batch file and the task scheduler are the best way to do it. As to >the syntax I've not used mysqlhotcopy but most of the mysql programs will >display help if you enter no parameters to invalid parameters. (or the >parameter --help) > >=C= > >* >* Cal Evans >* Journeyman Programmer >* Techno-Mage >* http://www.calevans.com >* > >-Original Message- >From: Mark Stringham [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, June 05, 2002 12:25 PM >To: [EMAIL PROTECTED] >Subject: Looking for some help > >I am running MySQL 3.23 on WIN 2k server and would like to create a daily >scheduled task that will utilize mysqlhotcopy (or other back up method) to >back up my db. I understand that I need to create a .BAT file that contains >the command to run hotcopy but I'm a bit confused as to the syntax. What do >I need to have in the .bat file to run hotcopy ? > >And is there a better way to run an automated backup ? > >Thanks in advance > >Mark > >- >Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > >- >Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail mysql.com> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > Regards, Mark Stringham 801.602.8791 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL or MS Access ?
On Wednesday 05 June 2002 4:54 pm, Jeremy P. McKay wrote: > I do not really think MS Access is for Mission-Critical databases...but I > guess that depends on ther definition of mission critical. Most MCP will > agree that MS Access does not scale well and offers little advantages for > Mission-Critical Enterprise Class Solutions. Now, If you were comparing MS > SQL Server to MySQLmaybe, MS Access scales reasonably well up to one simultaneous user. After that, literally all bets are off (and it _shouldn't_ work, it is like that by design). MS Access is designed to be used for small databases such as your own CD collection or something similar. It does this job quite well, probably better than MySQL does. But that's all. MS Access should not be used for anything much bigger. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Is it possibile to have something similar?
>IMHO, The Right Thing to do this, is to create the additional data in >your application (as you said you won't change the table). (...) thank you! >If you want this with SQL for sure, using user-defined variables will >work: cool. sorry, but I'm still learning, since I'm into MySQL from a few time only! >mysql> select @a := @a + 1 AS pos, gid from config where gid>30 limit 10; >+--++ >| pos | gid| >+--++ >|1 | 31 | >|2 | 32 | >|3 | 33 | ...can I use the "pos" data in a "WHERE" statment? something like.. select @a := @a + 1 AS pos, gid from config where pos > 100 and pos <200 ? (or there is a better way to have a particular subset of data WITHOUT HAVING ANY INFO ON THE DB STRUCTURE?! I'm trying to have a tool to paging the query result in a gui structure) >Another approach would be to select the data into a TEMPORARY TABLE. how can I do that? thank you very much again! bye bye! MAS! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Is it possibile to have something similar?
>It's not clear from your description whether the numbers are >associated with the records in the table or with the records returned I'm trying to choose a subset only of the select result... (without having any informations about the db/data structure) >should be handling in whatever you're using to write the GUI, not in >MySQL itself. I suppose you could do something like sure.. >SET @i = 0; thank you very much! bye! MAS! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MySQL or MS Access ?
MS Access MS Office Based. It is has more graphic tools. Possibly more people will be able to manipulate the database since Access has very little security, this is not usually an advantage. Lastly only a few people will be able to use you application before MS Access fails... Therefore limiting access to your mission critical applicaiton I do not really think MS Access is for Mission-Critical databases...but I guess that depends on ther definition of mission critical. Most MCP will agree that MS Access does not scale well and offers little advantages for Mission-Critical Enterprise Class Solutions. Now, If you were comparing MS SQL Server to MySQLmaybe, A Different Jeremy -Original Message- From: Jay Liew [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 3:28 PM To: [EMAIL PROTECTED] Subject: MySQL or MS Access ? Hello everyone, I am new to database operations, and I was wondering if there were any advantages or using MS Access to MySQL. Don't get me wrong, but I would prefer Open Source over proprietary, but this is a mission-critical commercial purpose database. Any comments, would be much appreciated. Thank you. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL or MS Access ?
On Wednesday 05 June 2002 4:28 pm, Jay Liew wrote: > Hello everyone, > > I am new to database operations, and I was wondering if there were any > advantages or using MS Access to MySQL. Don't get me wrong, but I would > prefer Open Source over proprietary, but this is a mission-critical > commercial purpose database. Any comments, would be much appreciated. Thank > you. MS Access has a graphical front-end and a graphical development environment. You have to get these separately in MySQL. Apart from that, there is nothing that Access does better than MySQL and a _lot_ that MySQL does better (multiple simultaneous users, stability, etc. etc.) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL or MS Access ?
Hello everyone, I am new to database operations, and I was wondering if there were any advantages or using MS Access to MySQL. Don't get me wrong, but I would prefer Open Source over proprietary, but this is a mission-critical commercial purpose database. Any comments, would be much appreciated. Thank you. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Attn: MySQL AB: we need 3.23.5x NOW !
On Wed, Jun 05, 2002 at 03:58:57PM -0600, Jayce^ wrote: > > I know my company is having a similar problem, the reason we're not > building our own anymore, and the same reason we're having trouble > with the rpms is the gcc on RH which is causing us serious stability > problems. Might have the same problem we're having. Yeah, I'm building with: gcc version 2.95.4 20011002 (Debian prerelease) Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.51: up 6 days, processed 165,644,525 queries (277/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Is it possibile to have something similar?
Hi. On Wed 2002-06-05 at 22:03:59 +0200, [EMAIL PROTECTED] wrote: > Hi. > > I need to have a cardinal number near each data, when I submit a query: > > for example, if my table is: > > +-+ > | example | > +-+ > | cat | > | dog | > | horse | > > > I'd like to have, with a "select" statement.. > > +-+---+ > | example | pos | > +-+---+ > | cat | 1 | > | dog | 2 | > | horse | 3 | > ... > [...] > IMPORTANT NOTE: I can't add a (permanent) column with an > "auto_increment" value; I'm writing a simple gui for mysql and I > don't want to alter the original db.. > > I'm using MySQL 3.23.49 > > can someone help me? [...] IMHO, The Right Thing to do this, is to create the additional data in your application (as you said you won't change the table). If you want this with SQL for sure, using user-defined variables will work: mysql> select @a := 0; +-+ | @a := 0 | +-+ | 0 | +-+ 1 row in set (0.00 sec) mysql> select @a := @a + 1 AS pos, gid from config where gid>30 limit 10; +--++ | pos | gid| +--++ |1 | 31 | |2 | 32 | |3 | 33 | |4 | 34 | |5 | 35 | |6 | 36 | |7 | 37 | |8 | 38 | |9 | 39 | | 10 | 300010 | +--++ 10 rows in set (0.00 sec) Another approach would be to select the data into a TEMPORARY TABLE. Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Attn: MySQL AB: we need 3.23.5x NOW !
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I know my company is having a similar problem, the reason we're not building our own anymore, and the same reason we're having trouble with the rpms is the gcc on RH which is causing us serious stability problems. Might have the same problem we're having. Jayce^ On Wednesday 05 June 2002 03:27 pm, Jeremy Zawodny wrote: > On Wed, Jun 05, 2002 at 11:31:56AM -0700, j.random.programmer wrote: > > If any folks from MySQL AB are reading this: > > > > I need to go into production *today* with 3.23.5x. I am using InnoDB > > heavily (and need the newer fixes). > > > > 3.23.50 hasn't even been released yet (the pre-release version is > > not "stable") and based on posts on this list, we know that there > > are several bug fixes and versions after 3.23.50 (for example > > 3.23.52 is rumored to exist). > > We're running a custom-compiled 3.23.51 (or .52-pre, depending how you > look at it) in production now. It's been up for about 6 days (details > below) and has been rock solid. > > Why not build your own? > > I can send you a binary that works for us. But you'd really need to > do some testing locally. > > I'm guessing that you're not a paid support customer of MySQL? If you > were, you might be able to get a binary out of them (but I don't know > for sure--I've never had to ask). > > Jeremy -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8/omhoTgdT9hhlCIRAoEgAJ9TYTT9HrppPTZ5HtBdsxchsrHNOQCgqc2X IxEYLSIyMxZRLljF3PEly+o= =yRIL -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Max Number of Rows
Hi. On Wed 2002-06-05 at 14:21:03 -0500, [EMAIL PROTECTED] wrote: > In the last episode (Jun 05), Pooja Daryani said: > > > > I need to know how many rows are supported in mysql db. > > If there is a limit, it's probably 4294967296 rows. But you'll > never get that many in a table anyway. :-) Due to interest I tried to look it up in the manual and did not found such a number, until it occured to me, that regarding the underlying structure of the database files, there is probably no row limit, but only a file size limit (by data pointer size). So the number of rows would be MAXSIZE / average_row_length and that is quite a lot (as the newer versions support 64Bit pointers). Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: More Query Help
Hi. On Wed 2002-06-05 at 13:37:22 -0500, [EMAIL PROTECTED] wrote: [...] > It selects a list of all members from the database referred by a certain > member. However, the query needs to be modified to also select the > number of people that person has referred. I planned to just send > another query looping through the results, but if a member has referred > 100 people, that's 100 queries, and probably not the best idea? That depends on your data and indexes. Sometimes a query becomes too complex for the optimzer of the RDMBS to do a good job. In those cases (and if the speed difference is actually relevant), it may be faster to do the non-pretty approch. That said, I would be suprised, if in your case the 101 queries would be faster than the one little bit more complex one (at least with the right indexes). > So to do this query, do I need to left join the table to itself? > Maybe something like: > > SELECT m1.username, m1.first_name, m1.email, DATE_FORMAT(m1.signup_date, > '%b %e, %Y') AS signup_date, COUNT(m2.id) AS count FROM members AS m1 > LEFT JOIN members AS m2 ON m1.referer = m2.id WHERE m1.referer = 4 GROUP > BY m1.referer > > Is that even close? heh Looks perfect to me. Any reason you are not satisfied with this? Does the result (you did try this out, didn't you? ;-) not match your expectations? Recommend index is of course, INDEX(referer). If the selected values are only a small portion of the tables, a combined index, namely INDEX(referer,username,first_name,email,signup_date), would help to prevent touching the data file at all (only using index file), but that only becomes relevant, if you are really observing the query being to slow. Especially, since the latter index may get quite big. Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Is it possibile to have something similar?
On 5 Jun 2002, at 22:03, Marco Stagno wrote: > and if I delete the 'dog' record... > > +-+---+ > | example | pos | > +-+---+ > | cat | 1 | > | horse | 2 | > ... > > IMPORTANT NOTE: I can't add a (permanent) column with an > "auto_increment" value; I'm writing a simple gui for mysql and I don't > want to alter the original db.. It's not clear from your description whether the numbers are associated with the records in the table or with the records returned by the select query, but it sounds like this might be something you should be handling in whatever you're using to write the GUI, not in MySQL itself. I suppose you could do something like SET @i = 0; SELECT animal, @i = @i + 1 AS pos FROM animals; -- Keith C. Ivey <[EMAIL PROTECTED]> Tobacco Documents Online http://tobaccodocuments.org - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication speed?
Hi. On Wed 2002-06-05 at 14:25:30 -0400, [EMAIL PROTECTED] wrote: > Hi all, > > Does anyone have any numbers on the speed of MySql replication? I am > concerned > with the transfer of up to 10 gigabytes to a master db... what state are > the slaves in during the replication catch up time? Is the delay primarily > related to the network bandwidth? I am assuming that all the SQL statements > are processed on the master and the changes are what get propagated... is > that correct? Not completely. The master logs all queries which change the database (mainly INSERT and DELETE) and will send them to the slave on request. AFAIK, the slave will execute the queries as if they were coming from an usual client (with a few exceptions), so it does the processing again. But that should not impose a major performance issue. I am not sure what the transfer method for initial synchronisation is, but I presume, some parsing is involved, too. Network speed usually won't be a major bottleneck, except if you are inserting really large records[1] or the connection to the database is slow. In my experience disk speed will be your main issue. Bye, Benjamin. [1] I.e. in a production database of ours the average INSERT/UPDATE size of the most common query is about 600 bytes (user postings). You would be able to transmit about 18.000 INSERTs over a standard 100MBit line. Of course you wouldn't be able to transfer those 10GB faster than 10GB/100MBit =~ 1000 secs =~ 17 mins on that line (in fact, you are lucky, if you get full transfer speed), but I have yet to see a standard (=non-high-end) hardware which could do so much inserts on average. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Looking for some help
What would you suggest? Mark At Wednesday, 5 June 2002, "Cal Evans" <[EMAIL PROTECTED]> wrote: >No, a batch file and the task scheduler are the best way to do it. As to >the syntax I've not used mysqlhotcopy but most of the mysql programs will >display help if you enter no parameters to invalid parameters. (or the >parameter --help) > >=C= > >* >* Cal Evans >* Journeyman Programmer >* Techno-Mage >* http://www.calevans.com >* > >-Original Message- >From: Mark Stringham [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, June 05, 2002 12:25 PM >To: [EMAIL PROTECTED] >Subject: Looking for some help > >I am running MySQL 3.23 on WIN 2k server and would like to create a daily >scheduled task that will utilize mysqlhotcopy (or other back up method) to >back up my db. I understand that I need to create a .BAT file that contains >the command to run hotcopy but I'm a bit confused as to the syntax. What do >I need to have in the .bat file to run hotcopy ? > >And is there a better way to run an automated backup ? > >Thanks in advance > >Mark > >- >Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > >- >Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail mysql.com> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > Regards, Mark Stringham 801.602.8791 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Attn: MySQL AB: we need 3.23.5x NOW !
On Wed, Jun 05, 2002 at 11:31:56AM -0700, j.random.programmer wrote: > If any folks from MySQL AB are reading this: > > I need to go into production *today* with 3.23.5x. I am using InnoDB > heavily (and need the newer fixes). > > 3.23.50 hasn't even been released yet (the pre-release version is > not "stable") and based on posts on this list, we know that there > are several bug fixes and versions after 3.23.50 (for example > 3.23.52 is rumored to exist). We're running a custom-compiled 3.23.51 (or .52-pre, depending how you look at it) in production now. It's been up for about 6 days (details below) and has been rock solid. Why not build your own? I can send you a binary that works for us. But you'd really need to do some testing locally. I'm guessing that you're not a paid support customer of MySQL? If you were, you might be able to get a binary out of them (but I don't know for sure--I've never had to ask). Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.51: up 6 days, processed 165,200,608 queries (277/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
I have problem with a Cyrillic
Description: I have problem with a Cyrillic when I use clauses "ORDER BY" and "LIKE". They didn't work correctly. Synopsis: Submitter-Id: Originator: Anelia Taneva Organization: MySQL support: email support Severity:serious Priority: high Category: mysqld Class: [ sw-bug | doc-bug | change-request | support ] Release:mysql-3.23.49 Exectutable:mysqld-nt Environment: System:WinXP Compiler: VC++ 6.0 Architecture: i __ 12MB-POP3-WAP-SMS---TOBA-E-mail.bG -- " Ako uckame u Bue agpec B mail.bg ugeme myk: http://www.mail.bg/new/ " - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: \T Question!!!
Hello. On Wed 2002-06-05 at 08:08:32 -0600, [EMAIL PROTECTED] wrote: > Hello, > > IS it possible to export a query from mysql in a specific format. > I created a query- SELECT id,title,class,grade FROM semester1; \T > semester1 > but it exported the query in a table form. > > Can anyone tell me if you can export the query in another formatTab > delimited,cvs etc. RTFM! A search for "TAB" in the online manual find this as second hit: http://www.mysql.com/doc/m/y/mysql.html which explains how to get a tab-delimited output Also: shell> mysql --help mysql Ver 11.11 Distrib 3.23.31, for pc-linux-gnu (i686) [...] -B, --batch Print results with a tab as separator, each row on a new line. Doesn't use history file. -e, --execute=... Execute command and quit. (Output like with --batch) -r, --raw Write fields without conversion. Used with --batch shell> mysqldump --help mysqldump Ver 8.12 Distrib 3.23.31, for pc-linux-gnu (i686) [...] -T, --tab=... Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon. [...] Use -T (--tab=...) with --fields-... --fields-terminated-by=... Fields in the textfile are terminated by ... --fields-enclosed-by=... Fields in the importfile are enclosed by ... --fields-optionally-enclosed-by=... Fields in the i.file are opt. enclosed by ... --fields-escaped-by=... Fields in the i.file are escaped by ... If it is not obvious, the latter is used to create CSV files. Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: mysql client
set yourself up a login from either that specific machine or from any machine (host=%). Then try it. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Jetaime [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 3:46 PM To: [EMAIL PROTECTED] Subject: mysql client how can i setup a mysql server on a machine that is on the network to accept connections from my machine. I downloaded the client and there is currently a server running on a nother machine on the LAN. I inputed it's ip address and username:root password: password for root and it says can't coonnec to the ip. The ip is correct. Do i have to configure the mysql server to accept the coonnecting, is it by default setup to disallow such connections? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can I connect to a MySQL Database on a unix platform from a PC?
> As a potential MySQL customer, I am trying to find the answer to the > question "Can I connect to a MySQL Database on a unix platform from a PC > through TCP/IP network? If the answer is yes, what other additional > supporting software will be needed on the Unix platform and on the PC? Any > pointers, examples are greatly appreciated. > The answer of this question is yes, I think there are lot of PC apps that can help you connect to mysql DB; I am using MySQL-Front on my PC to connect to MySQL DB on Linux, it is working fine. What you will need on your unix system will be mysql client library. Hope this help. Hisseine - Original Message - From: "Liqiang Feng" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 4:09 PM Subject: Can I connect to a MySQL Database on a unix platform from a PC? > As a potential MySQL customer, I am trying to find the answer to the > question "Can I connect to a MySQL Database on a unix platform from a PC > through TCP/IP network? If the answer is yes, what other additional > supporting software will be needed on the Unix platform and on the PC? Any > pointers, examples are greatly appreciated. > > Thanks. > > > Larry Feng > Software Engineer > Cisco Photonics, Inc. > RCDN4/2, S2-025 > 2200 East President George Bush Turnpike > Richardson, TX 75082 > 469-255-1247 > Fax 469-255-9488 > [EMAIL PROTECTED] > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysql client
how can i setup a mysql server on a machine that is on the network to accept connections from my machine. I downloaded the client and there is currently a server running on a nother machine on the LAN. I inputed it's ip address and username:root password: password for root and it says can't coonnec to the ip. The ip is correct. Do i have to configure the mysql server to accept the coonnecting, is it by default setup to disallow such connections? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can I connect to a MySQL Database on a unix platform from a PC?
In the last episode (Jun 05), Liqiang Feng said: > As a potential MySQL customer, I am trying to find the answer to the > question "Can I connect to a MySQL Database on a unix platform from a PC > through TCP/IP network? If the answer is yes, what other additional > supporting software will be needed on the Unix platform and on the PC? Any > pointers, examples are greatly appreciated. It's easy. All you need on the PC end is MyODBC, downloadable at http://www.mysql.com/downloads/api-myodbc-2.50.html . Instructions on how to set up a DSN and other questions is at http://www.mysql.com/products/myodbc/faq_toc.html . -- Dan Nelson [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Can I connect to a MySQL Database on a unix platform from a PC?
As a potential MySQL customer, I am trying to find the answer to the question "Can I connect to a MySQL Database on a unix platform from a PC through TCP/IP network? If the answer is yes, what other additional supporting software will be needed on the Unix platform and on the PC? Any pointers, examples are greatly appreciated. Thanks. Larry Feng Software Engineer Cisco Photonics, Inc. RCDN4/2, S2-025 2200 East President George Bush Turnpike Richardson, TX 75082 469-255-1247 Fax 469-255-9488 [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Is it possibile to have something similar?
Hi. I need to have a cardinal number near each data, when I submit a query: for example, if my table is: +-+ | example | +-+ | cat | | dog | | horse | I'd like to have, with a "select" statement.. +-+---+ | example | pos | +-+---+ | cat | 1 | | dog | 2 | | horse | 3 | ... and if I delete the 'dog' record... +-+---+ | example | pos | +-+---+ | cat | 1 | | horse | 2 | ... IMPORTANT NOTE: I can't add a (permanent) column with an "auto_increment" value; I'm writing a simple gui for mysql and I don't want to alter the original db.. I'm using MySQL 3.23.49 can someone help me? thank you in advance regards. Marco - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: WHERE-ing an alias...
On 5 Jun 2002, at 14:30, Ian M. Evans wrote: > As per previous suggestions, I use sort_title so that film titles like > "The Godfather" get sorted as "Godfather". In the above select I was > trying to narrow the search down so I could grab all the films that > started with 'G' but still using the sort_title. There are ways to fix your query so that it does what you ask, but I don't think it's going to solve your real problem. Presumably you also want to ignore initial "A" and "An" for sorting, and you likely want to ignore spaces and punctuation as well, so that "God's Army" and "God Save the Queen" don't come before "Godfather". And you don't want to be calculating sort_title for every record every time you do anything, because that will be very slow. I think you're going to need a sort_title column. -- Keith C. Ivey <[EMAIL PROTECTED]> Tobacco Documents Online http://tobaccodocuments.org - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Comparing array elements
Hi Dan, Close to what I want But no cigar just yet. Thanks for the help, but I think you mis-understood some parts of it. First things first, on creating the list of servers which is in a group - thanks, that works beautifully and I got it working. The query looks as follows: SELECT monitorhosts.HostID FROM monitorhosts LEFT JOIN monitorhostgroupdetails ON monitorhosts.HostID=monitorhostgroupdetails.HostID WHERE monitorhostgroupdetails.HostGroupID='1'; The WHERE clause simply specify which group I want to extract a server list for. However, selecting the items not in a group, only returns items that is not in a group AT ALL, and not all the items that isn't in a specific group as I want... Here's the layout of the two tables for you: Items Table (+- 10,000 Records - monitorhosts) +--+--+--+-+-+-- --+ | Field| Type | Null | Key | Default | Extra | +--+--+--+-+-+-- --+ | HostID | tinyint(4) | | PRI | NULL| auto_increment | | CompanyID| tinyint(4) | | MUL | 0 | | +--+--+--+-+-+-- --+ 2 rows in set (0.08 sec) Groups Table (+- 10 Records - monitorhostgroupdetails) +---+--+--+-+-++ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-++ | HostGroupDetailID | mediumint(9) | | PRI | NULL| auto_increment | | HostID| mediumint(9) | | MUL | 0 || +---+--+--+-+-++ 3 rows in set (0.76 sec) Now, I have 10,000 items. 1-1000 is assigned in group1, 500-1500 is assigned to group2, and 1500-10,000 is in Group3. I want to be able to use join queries, where I can take group1, generate a list of all the items in the group, and then generate a list of items not in group1. The same goes for group2, group3, groupX. Item's not in a group at all, must also be returned... One item can also be assigned to more than one group, which just adds to the complexity here I think :-( Basically, I want anything that is in group1 and, the rest. I've tried things like (to get items not in group1 for this example): SELECT monitorhosts.HostID FROM monitorhosts LEFT JOIN monitorhostgroupdetails ON monitorhosts.HostID=monitorhostgroupdetails.HostID WHERE monitorhostgroupdetails.HostID <> '1' OR monitorhostgroupdetails.HostID IS NULL; But that doesn't return the desired result :(( Also seeing that the answer to my question somehow lies in the LEFT / RIGHT JOIN statement, I went to have a read in the manual about the function / syntax... I didn't understand ANY of it :-( and I got a killer headache now as well, which just isn't helping right now... *shrugs* Any ideas? - Original Message - From: "Dan Nelson" <[EMAIL PROTECTED]> To: "Chris Knipe" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 7:45 PM Subject: Re: Comparing array elements > In the last episode (Jun 05), Chris Knipe said: > > Does anyone have and ideas of wisdom on how to compare arrays (mysql > > result sets) and group items based on if they exist in two or more > > arrays? > > > > Now, I want to compare group1 against the server list, and do something like > > the following: > > In group: > > server1 > > server4 > > server5 > > SELECT servers.server FROM servers LEFT JOIN group1 ON > servers.server=group1.server WHERE group1.server IS NOT NULL; > > > > Not in group: > > server2 > > server3 > > serverX > > SELECT servers.server FROM servers LEFT JOIN group1 ON > servers.server=group1.server WHERE group1.server IS NULL; > > -- > Dan Nelson > [EMAIL PROTECTED] > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Left join?
I'd correct my post to recommend: SELECT i.interest_id, COUNT(mi.interest_id) AS count, i.name FROM interests AS i left join member_interests AS mi on i.interest_id = mi.interest_id GROUP BY i.interest_id, i.name ORDER BY i.name My original group-by was wrong, as I was referring to the possibly-null mi.interest_id. I'll be interested in hearing which direction turns out to be correct. Here's an example layout, which you might want to correct me on: CREATE TABLE interests ( interest_id int(11) default NULL, name varchar(30) default NULL ) TYPE=MyISAM; INSERT INTO interests VALUES (1,'basketball'); INSERT INTO interests VALUES (2,'yoga'); INSERT INTO interests VALUES (3,'gardening'); INSERT INTO interests VALUES (4,'doing taxes'); CREATE TABLE member_interests ( member_id int(11) default NULL, interest_id int(11) default NULL ) TYPE=MyISAM; INSERT INTO member_interests VALUES (1,1); INSERT INTO member_interests VALUES (2,1); INSERT INTO member_interests VALUES (3,1); INSERT INTO member_interests VALUES (1,2); INSERT INTO member_interests VALUES (2,2); INSERT INTO member_interests VALUES (3,3); SELECT i.interest_id, COUNT(mi.interest_id) AS count, i.name FROM interests AS i left join member_interests AS mi on i.interest_id = mi.interest_id GROUP BY i.interest_id, i.name ORDER BY i.name +-+---+-+ | interest_id | count | name| +-+---+-+ | 1 | 3 | basketball | | 4 | 0 | doing taxes | | 3 | 1 | gardening | | 2 | 2 | yoga| +-+---+-+ This report shows that no one is interested in doing taxes. ;-) hth, Kevin > -Original Message- > From: Cal Evans [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 11:55 AM > To: [EMAIL PROTECTED]; 'Javier Campoamor'; [EMAIL PROTECTED] > Subject: RE: Left join? > > > You could be correct, but I don't think so. The question was count the > members and give me the description. Just by reading it, I > don't think your > query will answer that question. > > > I would however drop the distinct because the group by will > do that for you. > > > SELECT mi.interest_id, COUNT(*) AS count, > >i.name > > FROM member_interests AS mi left join outer interests AS i on > > mi.interest_id = i.id > > GROUP BY mi.interest_id > > ORDER BY i.name > > =C= > > * > * Cal Evans > * Journeyman Programmer > * Techno-Mage > * http://www.calevans.com > * > > > -Original Message- > From: Kevin Fries [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 11:10 AM > To: 'Javier Campoamor'; [EMAIL PROTECTED] > Subject: RE: Left join? > > > I have a reply for both Cal and Javier, > > Cal, > I have a hunch the JOIN is backward for you. > > > SELECT DISTINCT(mi.interest_id), COUNT(*) AS count, > >i.name > > FROM member_interests AS mi left join outer interests AS i on > > mi.interest_id = i.id > > GROUP BY mi.interest_id > > ORDER BY i.name > > That should produce all the interest_id's in > member_interests, and the count > of the records in interests > which match (which would be 0 or 1). Doesn't sound like what > you want. > Compare it to: > > SELECT i.interest_id, COUNT(*) AS count, i.name > FROM interests AS i left join member_interests AS mi on i.id = > mi.interest_id > GROUP BY mi.interest_id, i.name > ORDER BY i.name > > This query should show all records of interests, as well as a > count of the > number of members interested. > > > Javier, > In order to filter your query based on the count(*), you must > use the HAVING > clause, which is executed after the GROUP BY. It sounds like > you want: > > > SELECT mi.interest_id, COUNT(*) AS count, i.name > FROM member_interests AS mi left join outer interests AS i on > mi.interest_id = i.id > GROUP BY mi.interest_id > HAVING count < 5 > ORDER BY i.name > > > That query will show all mi.interest_id values, and the number of > > (BTW to all: It's unnecessary, and possibly misleading, to > use DISTINCT as > you have, in this query. > The GROUP BY makes sure tou only get one row with any distinct > mi.interest_id .) > > > -Original Message- > > From: Javier Campoamor [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, June 05, 2002 12:52 AM > > To: [EMAIL PROTECTED] > > Subject: RE: Left join? > > > > > > Hi, > > > > I have a similar problem (with phones & calls) but I would > > like to select > > only those elements that have less than a number. > > > > Using the previous example, is like selecting only those > > interest elements > > that have less that 5 members associated. > > > > Something like this (obviously this doesn't work) > > > > > > SELECT DISTINCT(mi.interest_id), COUNT(*) AS count, i.name > > FROM member_interests AS mi left join outer interests AS i on > > mi.interest_id = i.id > > > > AND count < 5 > > > > GROUP BY mi.interest_id > > ORDER BY i.name > > > > > > Does anyone hav
Re: Max Number of Rows
In the last episode (Jun 05), Pooja Daryani said: > > > > Hi All, > > > > I need to know how many rows are supported in mysql db. If there is a limit, it's probably 4294967296 rows. But you'll never get that many in a table anyway. -- Dan Nelson [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
still not-empty set
thanks for all the replies!! but it is not working. here is the loop: if($result == EMPTY SET){ $Scheduled = NULL; } else{ $Tech = mysql_result($result, 0, "tech"); $SNumber = mysql_result($result, 0, "snumber"); $Scheduled = mysql_result($result, 0, "scheduled"); } here is what i've tried and the results #1. if ($result == NULL){ Warning Unable to jump to row 0 on MySQL result index# in Location-of-file.php line 158 #2. if (is_null($result)){ SAME #3. if ($result == 'NULL'){ SAME #4. if($result){ WORKS but it executes the $Scheduled= NULL code on everything. even when there are actual results that are not empty set. Any more suggestions? thanks Chris Hohimer Sandia National Labs CSU821 ORG9623 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: WHERE-ing an alias...
[snip] SELECT posterdata.*, IF (aptitle LIKE 'The %',SUBSTRING(aptitle,5),IF (aptitle LIKE 'A %',SUBSTRING(aptitle,3),IF (aptitle LIKE 'An %',SUBSTRING(aptitle,4),aptitle))) AS sort_title FROM posterdata WHERE ap_type='Original Movie Poster' AND sort_title LIKE 'G%' ORDER BY sort_title ASC As per previous suggestions, I use sort_title so that film titles like "The Godfather" get sorted as "Godfather". In the above select I was trying to narrow the search down so I could grab all the films that started with 'G' but still using the sort_title. Since aliases aren't allowed in WHERE's, what can I do? [/snip] Use HAVING i.e. SELECT posterdata.*, IF (aptitle LIKE 'The %',SUBSTRING(aptitle,5), IF (aptitle LIKE 'A %',SUBSTRING(aptitle,3), IF (aptitle LIKE 'An%',SUBSTRING(aptitle,4),aptitle))) AS sort_title FROM posterdata WHERE ap_type='Original Movie Poster' ORDER BY sort_title ASC HAVING sort_title LIKE 'G%' ORDER BY sort_title ASC You may have to swap the HAVING and ORDER BY lines of the query, as I don't remember right off of the bat that order. I know a GROUP BY has to be before the HAVING. You can also use multiple HAVING clauses like a WHERE clause with each additional condition prefaced by AND or OR. HTH! Jay mysql, sql, query "It's hip to snip!" - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Left join?
You could be correct, but I don't think so. The question was count the members and give me the description. Just by reading it, I don't think your query will answer that question. I would however drop the distinct because the group by will do that for you. > SELECT mi.interest_id, COUNT(*) AS count, >i.name > FROM member_interests AS mi left join outer interests AS i on > mi.interest_id = i.id > GROUP BY mi.interest_id > ORDER BY i.name =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Kevin Fries [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 11:10 AM To: 'Javier Campoamor'; [EMAIL PROTECTED] Subject: RE: Left join? I have a reply for both Cal and Javier, Cal, I have a hunch the JOIN is backward for you. > SELECT DISTINCT(mi.interest_id), COUNT(*) AS count, >i.name > FROM member_interests AS mi left join outer interests AS i on > mi.interest_id = i.id > GROUP BY mi.interest_id > ORDER BY i.name That should produce all the interest_id's in member_interests, and the count of the records in interests which match (which would be 0 or 1). Doesn't sound like what you want. Compare it to: SELECT i.interest_id, COUNT(*) AS count, i.name FROM interests AS i left join member_interests AS mi on i.id = mi.interest_id GROUP BY mi.interest_id, i.name ORDER BY i.name This query should show all records of interests, as well as a count of the number of members interested. Javier, In order to filter your query based on the count(*), you must use the HAVING clause, which is executed after the GROUP BY. It sounds like you want: SELECT mi.interest_id, COUNT(*) AS count, i.name FROM member_interests AS mi left join outer interests AS i on mi.interest_id = i.id GROUP BY mi.interest_id HAVING count < 5 ORDER BY i.name That query will show all mi.interest_id values, and the number of (BTW to all: It's unnecessary, and possibly misleading, to use DISTINCT as you have, in this query. The GROUP BY makes sure tou only get one row with any distinct mi.interest_id .) > -Original Message- > From: Javier Campoamor [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 12:52 AM > To: [EMAIL PROTECTED] > Subject: RE: Left join? > > > Hi, > > I have a similar problem (with phones & calls) but I would > like to select > only those elements that have less than a number. > > Using the previous example, is like selecting only those > interest elements > that have less that 5 members associated. > > Something like this (obviously this doesn't work) > > > SELECT DISTINCT(mi.interest_id), COUNT(*) AS count, i.name > FROM member_interests AS mi left join outer interests AS i on > mi.interest_id = i.id > > AND count < 5 > > GROUP BY mi.interest_id > ORDER BY i.name > > > Does anyone have an idea to solve this kind of problem? Does > anyone know > where can I find a web site with complex queries? > > Thank you > > Javier > > > > -Mensaje original- > > De: Cal Evans [mailto:[EMAIL PROTECTED]] > > Enviado el: martes 4 de junio de 2002 22:48 > > Para: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > Asunto: RE: Left join? > > > > > > SELECT DISTINCT(mi.interest_id), COUNT(*) AS count, > >i.name > > FROM member_interests AS mi left join outer interests AS i on > > mi.interest_id = i.id > > GROUP BY mi.interest_id > > ORDER BY i.name > > > > You are correct, a left outer join is what you need. > > > > > > * > > * Cal Evans > > * Journeyman Programmer > > * Techno-Mage > > * http://www.calevans.com > > * > > > > > > -Original Message- > > From: Daren Cotter [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, June 04, 2002 2:07 PM > > To: [EMAIL PROTECTED] > > Subject: Left join? > > > > > > I have the following tables: > > > > Member_interests: > > Member_id > > Interest_id > > > > Interests: > > Name > > Interest_id > > > > I need a query that selects each interest name, and the # > of members who > > have selected it...sample output: > > Boating 25 > > Hiking 10 > > .. > > Swimming0 > > Jumping 0 > > Talking 0 > > > > The following query works great, but does not display the > Interest names > > with 0 members: > > SELECT DISTINCT(mi.interest_id), COUNT(*) AS count, i.name FROM > > member_interests AS mi, interests AS i WHERE mi.interest_id > = i.id GROUP > > BY mi.interest_id ORDER BY i.name > > > > Is there a way to have the "0"'s displayed as well? I'm > thinking a left > > join would probably be involved? > > > > > > > - > > Before posting, please check: > >http://www.mysql.com/manual.php (the manual) > >http://lists.mysql.com/ (the list archive) > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > To unsubscribe, e-mail > > <[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > > > > > > > > > -
RE: Looking for some help
No, a batch file and the task scheduler are the best way to do it. As to the syntax I've not used mysqlhotcopy but most of the mysql programs will display help if you enter no parameters to invalid parameters. (or the parameter --help) =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Mark Stringham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 12:25 PM To: [EMAIL PROTECTED] Subject: Looking for some help I am running MySQL 3.23 on WIN 2k server and would like to create a daily scheduled task that will utilize mysqlhotcopy (or other back up method) to back up my db. I understand that I need to create a .BAT file that contains the command to run hotcopy but I'm a bit confused as to the syntax. What do I need to have in the .bat file to run hotcopy ? And is there a better way to run an automated backup ? Thanks in advance Mark - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
More Query Help [more info]
I probably did not provide enough info the first time. The members table is setup as follows: Id (primary key) Referer (relates to the primary key of the table) I am given a member ID, say 4. I need to display all members who have been referred by member 4 (obviously no problem). However, for each row that matches, I also need the number of members referred by THAT member. I tried a simple join, but it doesn't display members with 0 referrals, so I'm thinking I need to left join the table to itself. The query I initially posted: SELECT m1.username, m1.first_name, m1.email, DATE_FORMAT(m1.signup_date, '%b %e, %Y') AS signup_date, COUNT(m2.id) AS count FROM members AS m1 LEFT JOIN members AS m2 ON m1.referer = m2.id WHERE m1.referer = 4 GROUP BY m1.referer; Does not work. It returns only one row (should be 3)...the count at the end is 3, which is the total of all members referred by all the members that should be returned...leading me to think I'm close, just not quite there! Would appreciate any help. Thanks all =) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: help with empty set
- Original Message - From: "Chris Hohimer" <[EMAIL PROTECTED]> To: "Anil Garg" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 2:26 PM Subject: Re: help with empty set > yeah that kinda works... > > what i have is > > $result = mysql($database "select x, y, z from $table where a and b and > c;", $link); > if ($result == empty set){ I think it shoudl work if u replace the above line with if ($result){ Plz write back the results > $z = NULL; > } > else > $x = mysql_result($result, 0, "x"); > $y= mysql_result($result, 0, "y"); > $z = mysql_result($result, 0, "z"); > } > > i have 1 row in my table. this row contains legit values for a, b, and c > so > when i set $result to NULL or 0 or whatever it goes into the ELSE > statement > but when select returns "Empty Set (0.02 sec)" it gives me this: > > Warning: Unable to jump to row 0 on MySQL result index# in > Location-of-file.php > > On Wednesday, June 5, 2002, at 12:20 PM, Anil Garg wrote: > > > have u tried with \0 ?? > > - Original Message - > > From: "Chris Hohimer" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, June 05, 2002 1:54 PM > > Subject: help with empty set > > > > > >> using PHP what is the value for a returned result from MySQL of "empty > >> set" > >> ex: > >> > >> if($result != NULL){ > >> do this > >> } > >> else{ > >> do that > >> } > >> > >> but NULL is not right. what should I replace NULL with? > >> > >> > >> > >> - > >> Before posting, please check: > >>http://www.mysql.com/manual.php (the manual) > >>http://lists.mysql.com/ (the list archive) > >> > >> To request this thread, e-mail <[EMAIL PROTECTED]> > >> To unsubscribe, e-mail > > <[EMAIL PROTECTED]> > >> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > >> > > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Max Number of Rows
> Hi All, > > I need to know how many rows are supported in mysql db. > > Thanks, > Pooja. > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
More Query Help
First off, I would like to thank everyone on this lists who helps people like myself! I'm having trouble with the following query: SELECT username, first_name, email, DATE_FORMAT(signup_date, '%b %e, %Y') AS signup_date FROM members WHERE referer = (id) It selects a list of all members from the database referred by a certain member. However, the query needs to be modified to also select the number of people that person has referred. I planned to just send another query looping through the results, but if a member has referred 100 people, that's 100 queries, and probably not the best idea? So to do this query, do I need to left join the table to itself? Maybe something like: SELECT m1.username, m1.first_name, m1.email, DATE_FORMAT(m1.signup_date, '%b %e, %Y') AS signup_date, COUNT(m2.id) AS count FROM members AS m1 LEFT JOIN members AS m2 ON m1.referer = m2.id WHERE m1.referer = 4 GROUP BY m1.referer Is that even close? heh - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Attn: MySQL AB: we need 3.23.5x NOW !
If any folks from MySQL AB are reading this: I need to go into production *today* with 3.23.5x. I am using InnoDB heavily (and need the newer fixes). 3.23.50 hasn't even been released yet (the pre-release version is not "stable") and based on posts on this list, we know that there are several bug fixes and versions after 3.23.50 (for example 3.23.52 is rumored to exist). Can someone *please* pick up the dropped ball on the release schedule and run with it ? It's not such a big deal for ISAM table users but it's a very big deal for InnoDB tables... Best regards, --j __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication speed?
Hi all, Does anyone have any numbers on the speed of MySql replication? I am concerned with the transfer of up to 10 gigabytes to a master db... what state are the slaves in during the replication catch up time? Is the delay primarily related to the network bandwidth? I am assuming that all the SQL statements are processed on the master and the changes are what get propagated... is that correct? Thanks! Any info would be greatly appreciated! Jared - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: help with empty set
yeah that kinda works... what i have is $result = mysql($database "select x, y, z from $table where a and b and c;", $link); if ($result == empty set){ $z = NULL; } else $x = mysql_result($result, 0, "x"); $y= mysql_result($result, 0, "y"); $z = mysql_result($result, 0, "z"); } i have 1 row in my table. this row contains legit values for a, b, and c so when i set $result to NULL or 0 or whatever it goes into the ELSE statement but when select returns "Empty Set (0.02 sec)" it gives me this: Warning: Unable to jump to row 0 on MySQL result index# in Location-of-file.php On Wednesday, June 5, 2002, at 12:20 PM, Anil Garg wrote: > have u tried with \0 ?? > - Original Message - > From: "Chris Hohimer" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, June 05, 2002 1:54 PM > Subject: help with empty set > > >> using PHP what is the value for a returned result from MySQL of "empty >> set" >> ex: >> >> if($result != NULL){ >> do this >> } >> else{ >> do that >> } >> >> but NULL is not right. what should I replace NULL with? >> >> >> >> - >> Before posting, please check: >>http://www.mysql.com/manual.php (the manual) >>http://lists.mysql.com/ (the list archive) >> >> To request this thread, e-mail <[EMAIL PROTECTED]> >> To unsubscribe, e-mail > <[EMAIL PROTECTED]> >> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php >> > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
WHERE-ing an alias...
Ah, after I write my SQL SELECT query I discover that you can't use WHERE with an alias. Here's what I'm trying to do: SELECT posterdata.*, IF (aptitle LIKE 'The %',SUBSTRING(aptitle,5), IF (aptitle LIKE 'A %',SUBSTRING(aptitle,3),IF (aptitle LIKE 'An %',SUBSTRING(aptitle,4),aptitle))) AS sort_title FROM posterdata WHERE ap_type='Original Movie Poster' AND sort_title LIKE 'G%' ORDER BY sort_title ASC As per previous suggestions, I use sort_title so that film titles like "The Godfather" get sorted as "Godfather". In the above select I was trying to narrow the search down so I could grab all the films that started with 'G' but still using the sort_title. Since aliases aren't allowed in WHERE's, what can I do? -- Ian Evans Digital Hit Entertainment http://www.digitalhit.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: help with empty set
have u tried with \0 ?? - Original Message - From: "Chris Hohimer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 1:54 PM Subject: help with empty set > using PHP what is the value for a returned result from MySQL of "empty > set" > ex: > > if($result != NULL){ > do this > } > else{ > do that > } > > but NULL is not right. what should I replace NULL with? > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: how do I get off this list?
I looked at the same message you got and at the bottom it says to try this address: [EMAIL PROTECTED] So perhaps eliminating the "digest" part in your address will work. Also, you have to do it from the same email account that you signed up with but you probably did that. >>> Bob Purvy <[EMAIL PROTECTED]> 06/05/02 13:36 PM >>> I'm really sorry to send this to the whole list, but I've tried every conceivable thing I can think of, over the last week, and none of it works. I promise this will be my only broadcast message, regardless of what happens next (so you don't need to flame about it!) specifically, I've tried: [EMAIL PROTECTED] (at least three times) [EMAIL PROTECTED] [EMAIL PROTECTED] and the the "List-Unsubscribe" header: [EMAIL PROTECTED] and several other addresses, . All ineffective. for the last one, I got back this: = Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. This is a generic help message. The message I received wasn't sent to any of my command addresses. --- Administrative commands for the mysql-digest list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: To subscribe to the list, send a message to: <[EMAIL PROTECTED]> To remove your address from the list, send a message to the address in the "List-Unsubscribe" header of messages from the list. If you don't know how to display headers and haven't changed E-mail addresses since subscribing, you'll be successful with an e-mail to: <[EMAIL PROTECTED]> - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: how do I get off this list?
Have you tried the link at the bottom of every message from the list? Chuck At 10:22 AM 6/5/2002 -0700, Bob Purvy wrote: >I'm really sorry to send this to the whole list, but I've tried every >conceivable thing I can think of, over the last week, and none of it >works. I promise this will be my only broadcast message, regardless of >what happens next (so you don't need to flame about it!) > >specifically, I've tried: > >[EMAIL PROTECTED] > >(at least three times) > >[EMAIL PROTECTED] > >[EMAIL PROTECTED] > > >and the > >the "List-Unsubscribe" header: > > >[EMAIL PROTECTED] > > > >and several other addresses, . All ineffective. > >for the last one, I got back this: > >= > >Hi! This is the ezmlm program. I'm managing the >[EMAIL PROTECTED] mailing list. > >This is a generic help message. The message I received wasn't sent to >any of my command addresses. > > >--- Administrative commands for the mysql-digest list --- > >I can handle administrative requests automatically. Please >do not send them to the list address! Instead, send >your message to the correct command address: > >To subscribe to the list, send a message to: > <[EMAIL PROTECTED]> > >To remove your address from the list, send a message to the address >in the "List-Unsubscribe" header of messages from the list. If you don't >know how to display headers and haven't changed E-mail addresses since >subscribing, you'll be successful with an e-mail to: > <[EMAIL PROTECTED]> > > > > >- >Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail ><[EMAIL PROTECTED]> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Maximum JOINED tables
* Arthur Fuller > > I have searched the manual without success. I want to know the maximum > > number of tables MySQL permits to be JOINed in a single SELECT > > statement. * Roger Baklund > According to crashme, it is 32 in 3.22.39 and 63 in 3.23.39. > > http://www.mysql.com/information/crash-me.php > * Weaver, Walt > Hmmm... we're running 3.23.47 here and have run into a 32 table join > limit... Yes... that is strange. There could be a bug in the crashme report, or the limit may have been lowered after 3.23.39, but neither of those seems very likely (to me, anyway)... anyone got a clue? -- Roger - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Slave logs, and defaults
Hi, I had an odd thing happen yesterday. I had replication running, the master being on a server farm, the slave being in our office. I tested it early in the morning by creating a table on the master, it showed up on the slave right away. Of course as soon(a few hours later) as I went to show my boss how cool replication is, it didn't work. I created a table on the master and it didn't show up on the slave. The next day, I came in and found the table was sitting on the slave as it should be. Looking in the slave log file I found the below: 020604 9:08:58 Slave: connected to master '[EMAIL PROTECTED]:3306', replication started in log 'www194-bin.001' at position 946 020604 17:48:22 Error reading packet from server: Lost connection to MySQL server during query (read_errno 22,server_errno=2013) 020604 17:48:22 Slave: Failed reading log event, reconnecting to retry, log 'foobar-bin.001' position 43408 020604 17:48:27 Slave: connected to master '[EMAIL PROTECTED]:3306',replication resumed in log 'foobar-bin.001' at position 43408 I didn't lose the connection to the server farm since I was sshed in at the time too. But still it seems to have just stopped for a time because of this error. That brings up the other question of what is the default connection retry? "slave_net_timeout Number of seconds to wait for more data from a master/slave connection before aborting the read." I read this above, but could not find out what the default value is. Thanks, Eric - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
help with empty set
using PHP what is the value for a returned result from MySQL of "empty set" ex: if($result != NULL){ do this } else{ do that } but NULL is not right. what should I replace NULL with? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Maximum JOINED tables
In the last episode (Jun 05), Sabine Richter said: > "Weaver, Walt" wrote: > > From: Roger Baklund [mailto:[EMAIL PROTECTED]] > > * Arthur Fuller > > > I have searched the manual without success. I want to know the > > > maximum number of tables MySQL permits to be JOINed in a single > > > SELECT statement. > > > > According to crashme, it is 32 in 3.22.39 and 63 in 3.23.39. > > > > Hmmm... we're running 3.23.47 here and have run into a 32 table > > join limit... > > And how long does it take to compile a 32-tables-statement? With the > gupta server a 14-tables-statement took 2 hours. That all depends on how complex your query is and the size of the tables. A query that takes 2 hours to run probably can be optimized a lot, though. -- Dan Nelson [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Comparing array elements
In the last episode (Jun 05), Chris Knipe said: > Does anyone have and ideas of wisdom on how to compare arrays (mysql > result sets) and group items based on if they exist in two or more > arrays? > > Now, I want to compare group1 against the server list, and do something like > the following: > In group: > server1 > server4 > server5 SELECT servers.server FROM servers LEFT JOIN group1 ON servers.server=group1.server WHERE group1.server IS NOT NULL; > Not in group: > server2 > server3 > serverX SELECT servers.server FROM servers LEFT JOIN group1 ON servers.server=group1.server WHERE group1.server IS NULL; -- Dan Nelson [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SunOS binary: compiled with pthreads or not?
Does anyone know whether this binary distribution was compiled with pthreads or not? mysql-3_22_30-sun-sunos4_1_4-sparc_tar.gz Or: does anyone know how one can find out? Thanks Peter Lloyd --- mysqlbug form --- From: Peter Lloyd <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Error 2003: mysql and mysqld not talking to one another >Description: Trying to run mysql always fails with error 2003: can't connect with server. >How-To-Repeat: ./bin/mysql -u root test >Fix: Not known. >Submitter-Id: [EMAIL PROTECTED] >Originator:Peter Lloyd >Organization: Nortel Networks >MySQL support: none >Synopsis: Trying to run mysql always fails with error 2003: can't connect with >server. >Severity: critical >Priority: high >Category: mysql >Class: support >Release: mysql-3.22.30 (TCX binary) >Environment: System: SunOS wcm1s0m1 5.6 Generic_105181-19 sun4u sparc SUNW,Ultra-5_10 Architecture: sun4 Some paths: /opt/bin/perl /usr/ccs/bin/make /opt/SUNWspro/bin/cc Compilation info: CC='gcc' CFLAGS='-O2 -fomit-frame-pointer' CXX='gcc' CXXFLAGS='-O2 -fomit-frame-pointer' LDFLAGS='' Configure command: ./configure --prefix=/usr/local/mysql '--with-comment=TCX binary' --disable-shared Perl: This is perl, version 5.005_02 built for sun4-solaris --- End of form --- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysql & mysqld cannot communicate (error 2003)
Problem: mysql & mysqld cannot communicate (error 2003) Synopsis: (a) I installed mysql on a Unix SunOS system, but the post-installation died silently in mysql_install_db. There were no diagnostic messages. Trial-and-error indicated that mysql_install-db has a bug (a missing '&'). When this is patched, the script seems to work. (b) But I still can't get any response from mysql, only error 2003: Can't connect to MySQL server. I've search the documentation and the newsgroup archives fairly intensively. I can see that a number of other people have had the same or similar problem, but none of the proposed solutions have worked for me. I have now spent about about 15 hours just trying to get MySQL to do anything. Full details below. Any useful suggestions that I've not already tried would be appreciated. System: Operating system: SunOS 5.6 on a Sun Ultra 5 MySql version: 3.22.30 Binary distribution: mysql-3_22_30-sun-sunos4_1_4-sparc_tar.gz Actions taken: (1) INSTALLATION 0. I installed a binary because I don't have C++ on my Unix box. I chose the SunOS-4 version of MySQL because that seemed closest to the SunOS-5 system that I am using. 1. The MySQL documentation recommends installing in /usr/local/ but this directory did not exist, and /usr is protected. So, I unprotected /usr and created /local. 2. I added the mysql command: shell> groupadd mysql shell> useradd -g mysql mysql 3. I attempted the specified unpacking command: shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf - which in my case should be: shell> gunzip < /usr/local/mysql-3_22_30-sun-sunos4_1_4-sparc_tar.gz | tar xvf - This did not work. (a) gunzip was not recognised, but I found that gzip -d could be used instead. (b) tar kept on failing with the error message 'tar: directory checksum error'. I downloaded some other versions of MySQL but got the same error. After searching around the net, it seemed that I needed to use GNU tar. I downloaded GNU tar; it didn't work, but then I found a GNU tar already on the system called 'gtar' and used that. (I then noticed the completely uninformative sentence in the MySQL documentation: "Sun tar is known to have problems", which is meaningful only in retrospect.) So, I unpacked the MySQL files with: shell> gzip -d < /usr/local/mysql-3_22_30-sun-sunos4_1_4-sparc_tar.gz | tar xvf - and created a link to the new directory: shell> ln -s /usr/local/mysql-3_22_30-sun-sunos4_1_4-sparc mysql (2) POST-INSTALLATION 4. The online documentation recommends the next step should be shell> ./configure but the file INSTALL-BINARY in the distribution doesn't mention this and, looking inside the script 'configure', all it seems to do is run mysql_install_db, so I skipped this step. 4. Then I tried to set up the 'grant tables' shell> cd mysql shell> ./scripts/mysql_install_db This successfully sets some local variables as reported on the screen: Creating db table Creating host table Creating user table Creating func table Creating tables_priv table Creating columns_priv table And then nothing at all happens. It just freezes and stays frozen. At this point (judging from what is inside the script, mysqld has been started up and the table creation commands issued, but there has been no response. It's not clear whether it is still expecting input. I typed in various SQL commands as well as the end-of-input code, but got no response. Finally, I hit and he process closed with 'Stopped (user)'. 4a. The standard failure message, 'Installation of grant tables failed!' was *not* produced. I believe this indicates that mysqld did not terminate. 4b. The (undisplayed) error message inside mysql_instal_db also suggested the following command to start the MySQL daemon: ./bin/mysqld --skip-grant & This did not succeed, as the parameter has to be --skip-grant-tables: ./bin/mysqld --skip-grant-tables & which seemed to work. But I still could not get any response from mysql. 4c. I read the relevant section of the online documentation (2.4.1 Problems Running mysql_install_db) but it had nothing to say about this situation. 4d. I therefore started looking through the archive of the newsgroup. I searched initially for 'mysql_install_db'. This yielded almost 2000 reports: the ones I looked at were all reporting problems identical or similar to mine, but without any solutions. I therefore restricted the search to 'mysql_install_db and SunOS', which reduced the set of messages to 53. These, too, were mostly reporting the same problem: mysql_install_db freezing up without any diagnostic messages. 4e. Looking at the script, it seems that, since the line does not end in '&', the daemon is executing in the foreground, so inevitably it will stay running forever (or until killed), and the code that follows this line (to report success or failure) will never be execute. To test this hypothesis, I tried the following: while the command window was frozen trying to
RE: UPDATE problems
> Isn't 'key' a reserved word? Yeah... *slaps forhead* That's why I "always" use 'id' as my key column name and "always" quote my column names. Thanks for the quick response! nik ( sql query ) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: [PHP] Comparing array elements
You can use in_array or array_search. > hey everyone, > > Does anyone have and ideas of wisdom on how to compare arrays (mysql result > sets) and group items based on if they exist in two or more arrays? > > For example: > > I have a table, with a list of servers: > server1 > server2 > server3 > server4 > server5 > ... > serverX > > I have a table that specifies which of the servers are grouped: > group1 > server1 > server4 > server5 > > Now, I want to compare group1 against the server list, and do something like > the following: > In group: > server1 > server4 > server5 > > Not in group: > server2 > server3 > serverX > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -Pushkar S. Pradhan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Maximum JOINED tables
And how long does it take to compile a 32-tables-statement? With the gupta server a 14-tables-statement took 2 hours. Sabine "Weaver, Walt" wrote: > > Hmmm... we're running 3.23.47 here and have run into a 32 table join > limit... > > --Walt > > -Original Message- > From: Roger Baklund [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 10:19 AM > To: mysql mailing list > Cc: Arthur Fuller > Subject: Re: Maximum JOINED tables > > * Arthur Fuller > > I have searched the manual without success. I want to know the maximum > > number of tables MySQL permits to be JOINed in a single SELECT statement. > > According to crashme, it is 32 in 3.22.39 and 63 in 3.23.39. > > http://www.mysql.com/information/crash-me.php > > > -- > Roger > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Comparing array elements
hey everyone, Does anyone have and ideas of wisdom on how to compare arrays (mysql result sets) and group items based on if they exist in two or more arrays? For example: I have a table, with a list of servers: server1 server2 server3 server4 server5 ... serverX I have a table that specifies which of the servers are grouped: group1 server1 server4 server5 Now, I want to compare group1 against the server list, and do something like the following: In group: server1 server4 server5 Not in group: server2 server3 serverX - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
how do I get off this list?
I'm really sorry to send this to the whole list, but I've tried every conceivable thing I can think of, over the last week, and none of it works. I promise this will be my only broadcast message, regardless of what happens next (so you don't need to flame about it!) specifically, I've tried: [EMAIL PROTECTED] (at least three times) [EMAIL PROTECTED] [EMAIL PROTECTED] and the the "List-Unsubscribe" header: [EMAIL PROTECTED] and several other addresses, . All ineffective. for the last one, I got back this: = Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. This is a generic help message. The message I received wasn't sent to any of my command addresses. --- Administrative commands for the mysql-digest list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: To subscribe to the list, send a message to: <[EMAIL PROTECTED]> To remove your address from the list, send a message to the address in the "List-Unsubscribe" header of messages from the list. If you don't know how to display headers and haven't changed E-mail addresses since subscribing, you'll be successful with an e-mail to: <[EMAIL PROTECTED]> - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Looking for some help
I am running MySQL 3.23 on WIN 2k server and would like to create a daily scheduled task that will utilize mysqlhotcopy (or other back up method) to back up my db. I understand that I need to create a .BAT file that contains the command to run hotcopy but I'm a bit confused as to the syntax. What do I need to have in the .bat file to run hotcopy ? And is there a better way to run an automated backup ? Thanks in advance Mark - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
enumerated type and indexing
Hello all, I have a table that has a column named foo. It is enumerated with values ("Excellent","Good","Fair","Poor") and is indexed. The table has a few million records in it. I recently did a select query where I mistakenly typed "where foo='Goo'" instead of 'Good'. This query took quite a long time (several minutes) to return the empty set, after which I noticed the misspelling. Two questions: 1) should not MySQL notice that 'Goo' is not one of the enumerated types and return immediately the empty set? 2) why did indexing not make this failed search return almost immediately? Should I bother indexing an enumerated set? /usr/sbin/mysqld -V returns this: /usr/sbin/mysqld Ver 3.23.46 for pc-linux-gnu on i686 uname -va returns this: Linux foobar1 2.2.18pre11-va2.1smp #1 SMP Thu Mar 29 10:12:18 PST 2001 i686 unknown Pointers to any URLs or printed sources are greatly appreciated. Regards, - Robert - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: UPDATE problems
[snip] tbl keyint, primary key, auto increment valint I've inserted several dummy values so that my table looks like this: key val 150 2100 3150 4200 I can successfully run this query: UPDATE tbl SET val = val + 1 but THIS query fails: UPDATE tbl SET val = val + 1 WHERE key = 2 [/snip] Isn't 'key' a reserved word? HTH! Jay - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: doc archive?
Thanks Egor (and the others who responded). I don't normally install unfamiliar software without first at least skimming the doc. Once I ran the install it unpacked the doc directory. See, first dumb question. 8-) --Gary Egor Egorov wrote: > > Gary, > Wednesday, June 05, 2002, 6:05:08 PM, you wrote: > > GD> Is there an archive of the MySQL doc? The doc at mysql.com is > GD> for v 4.0 alpha and I'd like to get the doc for v 2.23.49 > GD> which I just downloaded. (As a new user I'd like to be able > GD> to RTFM before bugging the list with dumb questions. I'll > GD> still probably ask dumb questions, but at least I'll have > GD> made an attempt...) > > First of all you can find docs that comes with MySQL distribution > package. > > MySQL online manual contains info not only about 4.x version but for 3.23.x, too. > > GD> Thanks much > GD> --Gary > > -- > For technical support contracts, goto https://order.mysql.com/?ref=ensita > This email is sponsored by Ensita.net http://www.ensita.net/ >__ ___ ___ __ > / |/ /_ __/ __/ __ \/ /Egor Egorov > / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] > /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ><___/ www.mysql.com > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
UPDATE problems
Hello, I'm new to the mailing list. I have a simple table: tbl keyint, primary key, auto increment valint I've inserted several dummy values so that my table looks like this: key val 150 2100 3150 4200 I can successfully run this query: UPDATE tbl SET val = val + 1 but THIS query fails: UPDATE tbl SET val = val + 1 WHERE key = 2 Is this a problem with MySQL? Take care, Nik - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: multiple where's
Chris, Wednesday, June 05, 2002, 6:51:16 PM, you wrote: CH> I am new to MySQL and SQL in general. CH> I was wondering how to narrow down a CH> search. I wanted to do something CH> like CH> select * from table where x, y, z; You can use AND and OR in WHERE clause, f.e. SELECT * FROM table WHERE x=1 AND y=2 AND z=3; Look at: http://www.mysql.com/doc/S/e/Selecting_rows.html CH> but this doesn't work. Can someone help me? -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: doc archive?
Gary, Wednesday, June 05, 2002, 6:05:08 PM, you wrote: GD> Is there an archive of the MySQL doc? The doc at mysql.com is GD> for v 4.0 alpha and I'd like to get the doc for v 2.23.49 GD> which I just downloaded. (As a new user I'd like to be able GD> to RTFM before bugging the list with dumb questions. I'll GD> still probably ask dumb questions, but at least I'll have GD> made an attempt...) First of all you can find docs that comes with MySQL distribution package. MySQL online manual contains info not only about 4.x version but for 3.23.x, too. GD> Thanks much GD> --Gary -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: doc archive?
I believe the docs for whatever version you downloaded are included in the full source distribution; they are at the top level of the source tree: manual_toc.html manual.html manual.txt But yes, it would be nice for the docs in various formats for previous - or at least recent - versions of MySQL to be archived somewhere. Who knows, they might be somewhere on the mysql.com site - I haven't looked. -steve At 11:05 AM -0400 6/5/02, Gary Delong wrote: >Is there an archive of the MySQL doc? The doc at mysql.com is >for v 4.0 alpha and I'd like to get the doc for v 2.23.49 >which I just downloaded. (As a new user I'd like to be able >to RTFM before bugging the list with dumb questions. I'll >still probably ask dumb questions, but at least I'll have >made an attempt...) > >Thanks much >--Gary > >- >Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail ><[EMAIL PROTECTED]> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- ++ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | ++ | "If only life would imitate toys." | | - Ted Raimi, March 2002 | | - http://www.whoosh.org/issue67/friends67a.html#raimi | ++ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
More normalization
Here's a design question similar to the current threads on normalization issues. Suppose I have three types of contact information I want to keep track of: Postal address, phone, and email. The design is that any given entity that has contacts info associated may have zero or more of each. I also have many types of entities which may have contact info. Individual people, businesses, departments within businesses, and so forth. These differ sufficiently that each gets its own table. The only way I can see to handle the contactable-entity-to-contacts mappings is to have M times N association tables, where M is the number of contact types and N the number of contactable entity types. So you'd have tables like PERSON_EMAIL, BUSINESS_POSTAL, and so forth, each just relating 1 of the first part to 0..N of the second. However, this design leads to an explosion of those 'join tables'. If I have four contact types (say I add 'url') and five contactable entity types, I end up with 20 join tables! I can obviously do this, but I can't help thinking I'm missing some way to simplify this design. So...any suggestions? query sql -- | Craig Berry - http://www.cine.net/~cberry/ --*-- "When resolving office conflicts, remember the wisdom of | Mahatma Gandhi: If enough peasants die horribly, someone will probably notice." -- The Onion - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Maximum JOINED tables
Hmmm... we're running 3.23.47 here and have run into a 32 table join limit... --Walt -Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 10:19 AM To: mysql mailing list Cc: Arthur Fuller Subject: Re: Maximum JOINED tables * Arthur Fuller > I have searched the manual without success. I want to know the maximum > number of tables MySQL permits to be JOINed in a single SELECT statement. According to crashme, it is 32 in 3.22.39 and 63 in 3.23.39. http://www.mysql.com/information/crash-me.php > -- Roger - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: OUTFILE
As far as I can tell it works from root (Linux, BSD) but may not be the case for all distros. Do a quick test and you will be able to find out. HTH! Jay mysql, query, sql Always reply to the list, so that others may participate in the discussion. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: multiple where's
[snip] I am new to MySQL and SQL in general. I was wondering how to narrow down a search. I wanted to do something like select * from table where x, y, z; but this doesn't work. Can someone help me? [/snip] select * from table where x and y and z HTH! Jay "It's hip to snip!" - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: OUTFILE
[snip] Is there a way to designate which folder on the server the OUTFILE ends up in? Will it accept a full path in the file name? [/snip] yep, even something like "/somefolder/someotherfolder/somefile.foo" HTH! Jay mysql, sql, query "It's hip to snip!" - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Maximum JOINED tables
* Arthur Fuller > I have searched the manual without success. I want to know the maximum > number of tables MySQL permits to be JOINed in a single SELECT statement. According to crashme, it is 32 in 3.22.39 and 63 in 3.23.39. http://www.mysql.com/information/crash-me.php > -- Roger - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Left join?
I have a reply for both Cal and Javier, Cal, I have a hunch the JOIN is backward for you. > SELECT DISTINCT(mi.interest_id), COUNT(*) AS count, >i.name > FROM member_interests AS mi left join outer interests AS i on > mi.interest_id = i.id > GROUP BY mi.interest_id > ORDER BY i.name That should produce all the interest_id's in member_interests, and the count of the records in interests which match (which would be 0 or 1). Doesn't sound like what you want. Compare it to: SELECT i.interest_id, COUNT(*) AS count, i.name FROM interests AS i left join member_interests AS mi on i.id = mi.interest_id GROUP BY mi.interest_id, i.name ORDER BY i.name This query should show all records of interests, as well as a count of the number of members interested. Javier, In order to filter your query based on the count(*), you must use the HAVING clause, which is executed after the GROUP BY. It sounds like you want: SELECT mi.interest_id, COUNT(*) AS count, i.name FROM member_interests AS mi left join outer interests AS i on mi.interest_id = i.id GROUP BY mi.interest_id HAVING count < 5 ORDER BY i.name That query will show all mi.interest_id values, and the number of (BTW to all: It's unnecessary, and possibly misleading, to use DISTINCT as you have, in this query. The GROUP BY makes sure tou only get one row with any distinct mi.interest_id .) > -Original Message- > From: Javier Campoamor [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 12:52 AM > To: [EMAIL PROTECTED] > Subject: RE: Left join? > > > Hi, > > I have a similar problem (with phones & calls) but I would > like to select > only those elements that have less than a number. > > Using the previous example, is like selecting only those > interest elements > that have less that 5 members associated. > > Something like this (obviously this doesn't work) > > > SELECT DISTINCT(mi.interest_id), COUNT(*) AS count, i.name > FROM member_interests AS mi left join outer interests AS i on > mi.interest_id = i.id > > AND count < 5 > > GROUP BY mi.interest_id > ORDER BY i.name > > > Does anyone have an idea to solve this kind of problem? Does > anyone know > where can I find a web site with complex queries? > > Thank you > > Javier > > > > -Mensaje original- > > De: Cal Evans [mailto:[EMAIL PROTECTED]] > > Enviado el: martes 4 de junio de 2002 22:48 > > Para: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > Asunto: RE: Left join? > > > > > > SELECT DISTINCT(mi.interest_id), COUNT(*) AS count, > >i.name > > FROM member_interests AS mi left join outer interests AS i on > > mi.interest_id = i.id > > GROUP BY mi.interest_id > > ORDER BY i.name > > > > You are correct, a left outer join is what you need. > > > > > > * > > * Cal Evans > > * Journeyman Programmer > > * Techno-Mage > > * http://www.calevans.com > > * > > > > > > -Original Message- > > From: Daren Cotter [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, June 04, 2002 2:07 PM > > To: [EMAIL PROTECTED] > > Subject: Left join? > > > > > > I have the following tables: > > > > Member_interests: > > Member_id > > Interest_id > > > > Interests: > > Name > > Interest_id > > > > I need a query that selects each interest name, and the # > of members who > > have selected it...sample output: > > Boating 25 > > Hiking 10 > > .. > > Swimming0 > > Jumping 0 > > Talking 0 > > > > The following query works great, but does not display the > Interest names > > with 0 members: > > SELECT DISTINCT(mi.interest_id), COUNT(*) AS count, i.name FROM > > member_interests AS mi, interests AS i WHERE mi.interest_id > = i.id GROUP > > BY mi.interest_id ORDER BY i.name > > > > Is there a way to have the "0"'s displayed as well? I'm > thinking a left > > join would probably be involved? > > > > > > > - > > Before posting, please check: > >http://www.mysql.com/manual.php (the manual) > >http://lists.mysql.com/ (the list archive) > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > To unsubscribe, e-mail > > <[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > > > > > > > > > - > > Before posting, please check: > >http://www.mysql.com/manual.php (the manual) > >http://lists.mysql.com/ (the list archive) > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > To unsubscribe, e-mail > > <[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.my
RE: Maximum JOINED tables
Yup, it'd be the answer to everything. :>) -Original Message- From: Andrew Hazen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 10:00 AM To: Weaver, Walt; 'Arthur Fuller'; 'mysql mailing list' Subject: RE: Maximum JOINED tables Would have been a little spooky if were '42'! :) Andrew Hazen -Original Message- From: Weaver, Walt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 11:51 AM To: 'Arthur Fuller'; mysql mailing list Subject: RE: Maximum JOINED tables 32. -Original Message- From: Arthur Fuller [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 9:48 AM To: mysql mailing list Subject: Maximum JOINED tables I have searched the manual without success. I want to know the maximum number of tables MySQL permits to be JOINed in a single SELECT statement. TIA, Arthur - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: adel 23 : compilation and link problem on linux
adelpfe wrote: > I am using mysql++1.7.9. > i have installed and configured mysql++ > but , i don't succeed even to compile the examples given with the api. > please , try to help me. > How can i find dependicies. > how can I link > .. > thaks all > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Maximum JOINED tables
Would have been a little spooky if were '42'! :) Andrew Hazen -Original Message- From: Weaver, Walt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 11:51 AM To: 'Arthur Fuller'; mysql mailing list Subject: RE: Maximum JOINED tables 32. -Original Message- From: Arthur Fuller [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 9:48 AM To: mysql mailing list Subject: Maximum JOINED tables I have searched the manual without success. I want to know the maximum number of tables MySQL permits to be JOINed in a single SELECT statement. TIA, Arthur - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
multiple where's
I am new to MySQL and SQL in general. I was wondering how to narrow down a search. I wanted to do something like select * from table where x, y, z; but this doesn't work. Can someone help me? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Maximum JOINED tables
32. -Original Message- From: Arthur Fuller [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 9:48 AM To: mysql mailing list Subject: Maximum JOINED tables I have searched the manual without success. I want to know the maximum number of tables MySQL permits to be JOINed in a single SELECT statement. TIA, Arthur - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Maximum JOINED tables
I have searched the manual without success. I want to know the maximum number of tables MySQL permits to be JOINed in a single SELECT statement. TIA, Arthur - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Is it possible to have MySQL perform an action at a specifictime?
- Original Message - From: "Jay Blanchard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 04, 2002 8:48 PM Subject: RE: Is it possible to have MySQL perform an action at a specific time? > Sounds like you need to run a CRON job (you will have to know if your > specific implementation has this.) You can have the CRON run a script > that will perform the actions. CRON is definitely the way to go. > You can use many script types to accomplish > this such as PERL, AWK, PHP (you have to install PHP as a CGI binary) And if you use the ever-handy "lynx" command, PHP can be an apache_module too. :) - Mark System Administrator Asarian-host.org --- "If you were supposed to understand it, we wouldn't call it code." - FedEx - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
adel 23 : compilation and link problem
I am using mysql++1.7.9. i have installed and configured mysql++ but , i don't succeed even to compile the examples given with the api. please , try to help me. How can i find dependicies. how can I link .. thaks all - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
OUTFILE
Hi, Is there a way to designate which folder on the server the OUTFILE ends up in? Will it accept a full path in the file name? Mysql;mysql;mysql; Andrew Hazen, O.C.P. E-Commerce Developer Jatech Solutions Inc. www.jatech.ca Specializing in OSCOMMERCE applications and PHP/MySQL programming. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: setting up two instances of mySQL
- Original Message - From: "Chris Stefanick" <[EMAIL PROTECTED]> To: "MySQL Support" <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 2:55 PM Subject: setting up two instances of mySQL > I have one product already using a mySQL database. We just inherited a > new > product (via an acquisition) that uses it's own mySQL database which we're > going to stick on the same server. My manager wants me to setup a second > instance of mySQL on the machine for the new product's database. I don't > see the point. Why not just have both databases running under the same > instance of mySQL? Which brings me to my question. What are the pros and > cons of setting up multiple instances of mySQL on the same machine? I read the reply about the ability to run under two different users. True. Plus the advantage would be that both administrators of the two products can each have full root-access to their MySQL server. That, to me, would be the main pro. But I cannot help but feel this is like running a separate instance of qpopper for each individual mailbox. It will shave an additional ~ 13-30 MB off your resources, and if you only take a few moments to set up the privilege system properly (removing anonymous users, making sure all users have passwords, etc), there should really be no concern for security. And be careful who you give the file privilege to. Most security holes really stem from an improper grasp of the privilege system. Like forgetting to specifically revoke privileges for a table when you delete that table, and not realizing the alter privilege may be used to subvert the privilege system by renaming tables, etc. But if you took care of those, I truly see no real security issue. Plus, if you start your server with the --safe-show-database option, SHOW DATABASES will only return those databases for which the user has some kind of privilege. More experienced users may be aware of nifty security holes that I am unaware of; but under normal circumstances, my preference is to not run a separate instance for each separate database. YMMV, as they say. - Mark System Administrator Asarian-host.org --- "If you were supposed to understand it, we wouldn't call it code." - FedEx - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
doc archive?
Is there an archive of the MySQL doc? The doc at mysql.com is for v 4.0 alpha and I'd like to get the doc for v 2.23.49 which I just downloaded. (As a new user I'd like to be able to RTFM before bugging the list with dumb questions. I'll still probably ask dumb questions, but at least I'll have made an attempt...) Thanks much --Gary - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: \T QUESTION
[snip] IS it possible to export a query from mysql in a specific format. I created a query- SELECT id,title,class,grade FROM semester1; \T semester1 but it exported the query in a table form. Can anyone tell me if you can export the query in another formatTab delimited,cvs etc. [/snip] from http://www.mysql.com/doc/S/E/SELECT.html SELECT stuff INTO OUTFILE "/tmp/result.csv" FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY "\n" FROM test_table; This will generate a CSV file HTH! Jay - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysqlhotcopy regexp problem with 640 and more Databases
In the last episode (Jun 05), Pabst Simon said: > Description: > > When using mysqlhotcopy 1.15 for database backups with --regexp='.*' and > having 640 or more Databases produces the following error: > > DBD::mysql::db do failed: File '/lvol1/mysql/data/mydatabase/mytable640.MYD' not >found (Errcode: 24) at ./bin/mysqlhotcopy line 432. And did you run "perror 24" to find out why the OS wouldn't let mysql open the file? $ perror 24 Error code 24: Too many open files $ Make sure the OS is configured to let mysql open lots and lots of files at once. -- Dan Nelson [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
\T QUESTION
Hello, IS it possible to export a query from mysql in a specific format. I created a query- SELECT id,title,class,grade FROM semester1; \T semester1 but it exported the query in a table form. Can anyone tell me if you can export the query in another formatTab delimited,cvs etc. Any help appreciated. Thanks - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysqlhotcopy regexp problem with 640 and more Databases
Description: When using mysqlhotcopy 1.15 for database backups with --regexp='.*' and having 640 or more Databases produces the following error: DBD::mysql::db do failed: File '/lvol1/mysql/data/mydatabase/mytable640.MYD' not found (Errcode: 24) at ./bin/mysqlhotcopy line 432. The file exists though. If i create a table alphabetically before the one with the error, then the next time i use mysqlhotcopy it also produces the error on the next table alphabetically before, but always on the 640. table. Line 432 of mysqlhotcopy 1.15 is: $dbh->do("LOCK TABLES $hc_locks"); Commenting that line makes the error go away. mysqlhotcopy also works fine if i use it only on the single database where the error occurs with --regexp='mydatabase.*' since there are less than 640 Tables then. How-To-Repeat: Use mysqlhotcopy 1.15 on a MySQL Server with 640 or more Tables Syntax: mysql/bin/mysqlhotcopy --regexp='.*' /somedir Fix: ? Submitter-Id: Originator:Simon Pabst Organization: Siemens Business Services MySQL support: none Synopsis: mysqlhotcopy regexp problem with 640 and more Databases Severity: serious Priority: high Category: mysql Class: sw-bug Release: mysql-3.23.49 (Official MySQL binary) Environment: System: SunOS 5.8 Generic_108528-08 sun4u sparc SUNW,Ultra-Enterprise-1 Architecture: sun4 Some paths: /usr/bin/perl /usr/local/bin/make /usr/local/bin/gcc /usr/ucb/cc GCC: Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs gcc version 2.95.3 20010315 (release) Compilation info: CC='gcc' CFLAGS='-O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' LIBC: -rw-r--r-- 1 root bin 1749356 Jul 20 2000 /lib/libc.a lrwxrwxrwx 1 root root 11 Mar 6 2001 /lib/libc.so -> ./libc.so.1 -rwxr-xr-x 1 root bin 1135056 Jul 20 2000 /lib/libc.so.1 -rw-r--r-- 1 root bin 1749356 Jul 20 2000 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Mar 6 2001 /usr/lib/libc.so -> ./libc.so.1 -rwxr-xr-x 1 root bin 1135056 Jul 20 2000 /usr/lib/libc.so.1 Configure command: ./configure --prefix=/lvol1/mysql '--with-comment=Official MySQL binary' --with-extra-charsets=complex --with-server-suffix= --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared Perl: This is perl, v5.6.1 built for sun4-solaris-multi DBI 1.20 DBD-mysql-2.1017 Sincerely Simon Pabst mailto:[EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php