RE: [PHP] Performance
Hi. use mysql_pconnect. the manual page has a ton of info on using it to avoid the problem you're describing. http://ca.php.net/manual/en/function.mysql-pconnect.php hth. -ravi -Original Message- From: markus|lervik [mailto:[EMAIL PROTECTED]] Sent: December 13, 2001 3:30 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Performance On Thu, 2001-12-13 at 22:16, Ron Jamison wrote: > I'm fairly sure there's no difference in performance when using PHP tags > mixed with HTML blocks as you are doing. > > Think of it as PHP knowing that it should send everything not in tags > directly to the browser. Like an echo or a print, but without needing to > specify calls to those functions. > > > > > > > > I'm not -that- worried about performance loss for switching between, php and html, what annoys me (and would probably slow down performance quite a bit), is that every time I have to do a database query, I have to use mysql_connect again, because as Prottoss pointed out, PHP drops the connection every time a PHP-block ends. Not that it is that a big issue for my particular application, but knowing a workaround to this problem would be quite useful in the future. Cheers, Markus -- Markus Lervik Linux administrator with a kungfoo grip Vasa City Library - Public Library - 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: Graphical Database Information
We use this: http://www.datanamic.com/dezign/ Try the demo before buying it, it's not quite as good as it looks (unfortunately). Along with the "ImportER MySQL" you can just set it loose on your DDLs and it will generate a semi-complete ER diagram of your database. It helps if your foreign keys are named the same, i.e. Customer.customerID => Invoice.customerID so that it can generate those relationships too. With a bit of manual tweaking, it works well enough for us. hth. -ravi. -Original Message- From: Steve Osborne [mailto:[EMAIL PROTECTED]] Sent: November 30, 2001 12:29 PM To: MySQL (E-mail) Subject: Graphical Database Information Is there a utility that will allow me to view a mysql database that is similar to an Access 2000 relationship diagram? Steve Osborne Database Programmer Chinook Multimedia Inc. - 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: compile problems on Solaris8
Hi. >This didn't seem to make it to the list the first time so let's try again. BTW is anybody else >receiving each mail twice from the list? It did, it's just that no one answered it. :] Not me, the last time I thought that was happening, it had to do with my mail sorting rules in Outlook. >I am getting the same error message "configure: error: cannot run test program while cross compiling". I think >this a simple PATH issue where basic functions such as sprintf are not found. It's been a while since I tried to compile mysql on a Solaris box, but that error most like likely indicates a compiler-related issue...I don't know how much help I can be with this, but one thing missing from your earlier post is what arguments (if any) you passed to ./configure. I'd be interested to see those if you could post them. I was just about to hit send, when I got curious and found something: This page (http://www.mysql.com/doc/S/o/Solaris.html) says to add a line to your config.cache, and also has recommended configure arguments. hth. -ravi. - 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: Please redo this horrible web page
That has happened to me occasionally, I wrote it off as me being tired. It seems to work now, although a date/thread list would be nice. But those (along with my email address!) are all over the net. -ravi. -Original Message- From: Keith C. Ivey [mailto:[EMAIL PROTECTED]] Sent: November 28, 2001 4:28 PM To: [EMAIL PROTECTED] Subject: RE: Please redo this horrible web page On 28 Nov 2001, at 15:28, Ravi Raman wrote: > Not really interested in getting involved in the flamewar that seems to be > brewing, but this might help: > > http://www.nexial.com/mailinglists/ Does that work for you? The "MySQL" button on the side links to a URL that just redirects back to http://www.nexial.com/mailinglists/. I seem to recall having that problem months ago, which is why I've never bothered with the Nexial archives. -- Keith C. Ivey <[EMAIL PROTECTED]> Washington, DC - 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: Please redo this horrible web page
Hi. Not really interested in getting involved in the flamewar that seems to be brewing, but this might help: http://www.nexial.com/mailinglists/ -ravi. -Original Message- From: john [mailto:[EMAIL PROTECTED]] Sent: November 28, 2001 2:52 PM To: Johnny Withers; 'Etienne Marcotte' Cc: 'MySQL Lists'; [EMAIL PROTECTED] Subject: RE: Please redo this horrible web page Mr. Winters, They do have a very slow search engine built in to the site. Look at the header. -Original Message- From: Johnny Withers [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 28, 2001 1:09 PM To: 'Etienne Marcotte'; 'raezor' Cc: 'MySQL Lists'; [EMAIL PROTECTED] Subject: RE: Please redo this horrible web page Really... you could also search it with some sort of search function in your browser.. - Johnny Withers [EMAIL PROTECTED] p. 601.853.0211 c. 601.209.4985 -Original Message- From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 28, 2001 12:16 PM To: raezor Cc: MySQL Lists; [EMAIL PROTECTED] Subject: Re: Please redo this horrible web page I know you won't read my answer since I'm not from mysql but I wanna give my 2 cents. First don't you think you could go the "smooth" way for making a request? Either I'm not in a good mood or I can't read english, but your post seemed harsh. It's probably a really huge task to have this archive in a better way, yes it would help, having a searcheable index, search function, etc etc. But if you fool around a little you'll realize that all mail archives are this way (check the one of [EMAIL PROTECTED]) Anyways, I don't think by writing "Let's make everything as hard as is possible for the "newbies"." you'll help our newbie cause. Etienne raezor wrote: > > Let's make everything as hard as is possible for the "newbies". > > Please alphabetize or at least use some sort of date organization for the > http://lists.mysql.com/cgi-ez/ezmlm-cgi/1#b instead of making us search > through every entry, including those that have never been responded to. The > Messages by date are messages by submitter. If this is not true, make the > site say date=Nov.1(listed messages) Nov.2(listed messages). What a waste of > time this is for anyone, nonetheless us newbies. I assumed the purpose of > this list was to make things easier. If I am incorrect or viewing this > incorrectly, please reply and let me know (only responses from email address > @mysql.com will be read). > > 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 -- Etienne Marcotte Specifications Management - Quality Control Imperial Tobacco Ltd. - Montreal (Qc) Canada 514.932.6161 x.4001 - 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 - 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! Hosed Database!
hi. /path/to/mysql means the path to the mysql _executable_... type 'which mysql' to see for sure, but it might be /apache/mysql/bin/mysql. good luck. -ravi. -Original Message- From: Ben Ocean [mailto:[EMAIL PROTECTED]] Sent: November 26, 2001 2:38 PM To: [EMAIL PROTECTED] Subject: HELP! Hosed Database! But I have a backup, if I just knew how to restore it! The instructions read: #mysqldump --opt database_name > database_name_File.txt To restore database: #cat database_name_File.txt | /path/to/mysql -u username -p database_name So, if my installation is at /apache/mysql and the database is /apache/mysql/lefeber and my backup is /apache/mysql/lefeber.txt then I should be able to issue this command: cat lefeber.txt | /apache/mysql -u MyUserName -pMyPassword lefeber Why does it tell me that /apache/mysql is a directory (duh) and break the pipe? BenO - 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: does lmysqlclient.so exist in 3.23.44 ?
Hi again. Why were you compiling php against the mysql source rather than using the built-in mysql support in php? >From what I've read, it's probably more trouble than it's worth on OSX... -ravi. -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: November 23, 2001 10:10 AM To: [EMAIL PROTECTED] Subject: does lmysqlclient.so exist in 3.23.44 ? Well, I asked a lengthy question earlier with all kinds of extraneous information pertaining to my problem. Allow me to re-ask in a more simple fashion -- does a file called 'lmysqlclient.so' exist in MySQL 3.23.44 ? I built this distribution from source and cannot find it anywhere. I need it for my PHP4 > Apache DSO compile. Thank you, Erik __ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 - 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: New fork of MySQL
hi. regarding 'bundling' GPL products with commercial ones: http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem to summarize, it's okay, if it's done properly. hth. -ravi. -Original Message- From: Shankar Unni [mailto:[EMAIL PROTECTED]] Sent: November 9, 2001 2:24 PM To: [EMAIL PROTECTED] Subject: Re: New fork of MySQL Steve Meyers wrote: > The MySQL source is under the GPL. Any fork must also be under the > GPL. You may sell your forked MySQL, but you must also provide the > source code. Is it really, now? What are the rules about "bundling" now? If we distribute a (standalone) copy of MySQL with our product, does that expose our product to the GPL? Or is it just like distributing a copy of Emacs with your OS? (I.e. as long as you make the source available, it doesn't automatically GPL the rest of your OS?) What if the product is designed to work with many databases, but we want to distribute MySQL only as a "default database" (i.e. it doesn't depend on MySQL for its functionality - it's merely a convenience)? Does that change the GPL liability on our product? Who can answer these questions? -- Shankar. - 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: Problem with query
hi. first of many replies, i'm sure: mysql> select count(compid) from dbLastFaxed where lastFaxedDateTime IS null ; when you're looking for NULL fields, select where something IS NULL, instead of '=' -Original Message- From: Brendin [mailto:[EMAIL PROTECTED]] Sent: October 26, 2001 5:46 PM To: [EMAIL PROTECTED] Subject: Problem with query I am having a strange problem with a query... I have a table that contains 3 columns and 3,315,599 rows. One of the columns is a date time field. Out of 3,315,599 rows 1,555,157 contain an entry in the date time field and the other 1,760,442 rows contain null in the date time field Here is the problem I will illustrate it with queries and results. - 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 to copy table structure easily.
Dexter wrote: >Just want to copy the table structure of a table i Have but dont have the >the create statement and dont want to have to type it again , it has a lot >of fields. Can I easily replicate a table. or: >SHOW CREATE TABLE table_name; will show the SQL necessary to recreate a table. -ravi. -Original Message- From: Robert Cross [mailto:[EMAIL PROTECTED]] Sent: October 22, 2001 10:07 AM To: Dexter Coelho Cc: [EMAIL PROTECTED] Subject: Re: How to copy table structure easily. - 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: [OT] FAQ
>I do keep forgetting about it. And it seems that MySQL has a 'Dynamic FAQ' >linked from their site. Perhaps we could get them to add a link to the >bitbybit version too? (MySQL Folks?) Ideally linked from this page: http://www.mysql.com/documentation/index.html - 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: A COMPANY RELEASES A NON-FINAL VERSION OF SOME PRODUCT NON-PREMIUM EDITION
I agree. The attitude I have towards MySQL-related announcement messages on this list is roughly the same as the attitude I have towards all the other messages...read them if they look interesting, ignore them if they don't. I really doubt most people read _every_ message on this list, and if they do, it's not a big deal to skip a relevant message that has an informative, _non-caps_ subject. I guess capitalization's a touchy subject for some people, even only subject lines... ...and to just record another one of my opinions for posterity: I still think something like the FAQ section on php.net might be in order on mysql.com, at some point and implemented by someone with more free time than me. :] (...if anybody like that is reading...) -Original Message- From: Eric Frazier [mailto:[EMAIL PROTECTED]] Sent: October 18, 2001 1:41 PM To: Jonathan Hilgeman Cc: 'Cathy Cunningham (Blue World Lasso Evangelist)'; [EMAIL PROTECTED] Subject: RE: A COMPANY RELEASES A NON-FINAL VERSION OF SOME PRODUCT NON-PREMIUM EDITION Hi, This is complete crap. One of the tools I use is because of an email I saw on this list that might have been called spam. I say that this type of email is on topic. Maybe they could have eased up on the BS tone of the email, but I would still want to know about a new product. The only other question that comes up is would it be worthwhile to setup a mySQL announce list for 3rd party tools? I don't exactly see dozens of these types of email a day right now though. 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
RE: [ANNOUNCE] BLUE WORLD RELEASES BETA VERSION OF LASSO PROFESSIONAL 5STANDARD EDITION
Good reply, Cathy. I'm not sure why there is such an outspoken negative reaction to a commercial software company announcing a related product on a mysql list...Not only can Mysql AB be considered a commercial software company, but so could myself and many others on this list. For the record, I (as a member of the "MySQL community") am usually mildly interested in knowing about software, commercial or open-source, that might ease my workload. As a change of topic: If there is an individual who is genuinely eager to type something in order to reduce traffic on this list, I suggest a Mysql FAQ that can be featured prominently on mysql.com. This would probably help cut down on the avalanche of "I can't find my socket file"/"Why can't I compile the binary"/"How do I make an auto_increment column" messages and could be added to incrementally. Any takers? - 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: time calculate
hi. store the information in a datetime column for easy handling. check out the function DATE_ADD() or DATE_SUB() on this page: http://www.mysql.com/doc/D/a/Date_and_time_functions.html it has examples of usage that could be helpful. i would do something like this: select TO_DAYS(secondDate) - TO_DAYS(firstDate), HOUR(secondDate)-HOUR(firstDate) from your_table; or to get more complicated: select (TO_DAYS(secondDate) - TO_DAYS(firstDate)) * 24 + HOUR(secondDate)-HOUR(firstDate) from your_table; find out the amount of days difference between the 2 dates, multiply by 24 to change it to hours, then add the difference in hours... that will probably do what you're looking for. hth. -ravi. -Original Message- From: Sommai Fongnamthip [mailto:[EMAIL PROTECTED]] Sent: October 18, 2001 4:27 AM To: [EMAIL PROTECTED] Subject: time calculate hi, I'd like to calculate hour usage between 2 time value. Which data type I should to use in mysql? and how to write sql to calculate hour usage especially when the second time is in the next day?? Thanks SF - 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: Is it possible to Rename Database
Or, use mysqldump to dump the entire database, edit the CREATE DATABASE line at the top to the new name and pipe it all back into mysql, then drop the old one? -ravi -Original Message- From: Carsten H. Pedersen [mailto:[EMAIL PROTECTED]] Sent: October 3, 2001 11:50 AM To: Brandon Lewis; [EMAIL PROTECTED] Subject: RE: Is it possible to Rename Database > Is it possible to rename a database? I would assume that the only way to do is is to shut down the server, then rename the directory of the database. / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - 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: database documentation
hi. i went looking all over the place for an ER diagramming tool that could read mysql dumps, and found this: http://www.datanamic.com/importerscripts/ which will connect to a mysql database and generate a diagram, guessing the foreign key relationships. this script is not free. the program the diagram is generated for, unfortunately, is as well not free. the evaluation versions seem to work okay, overlooking the missing functionality. if you (or anyone else) finds/has found anything better i'd be interested to know. -ravi. -Original Message- From: Eugene Mah [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 3:13 PM To: [EMAIL PROTECTED] Subject: database documentation What tools do people use to document their databases? Are there graphical tools that will generate relational diagrams of a database (like in Access)? One of the databases I've been developing is starting to grow as I add additional tables to hold different pieces of data. At the moment, my documentation comes from adding comments and CREATE statements to the result of an earlier mysqldump file. Back when I only had 7 or 8 tables, this was fine, but now my database is starting to approach 25 tables, so some of the relationships are starting to get a little hard to keep track of. Many thanks Eugene -- To put my contact info into your Palm device, click here: http://signature.coola.com/?[EMAIL PROTECTED] Personal Signature Coolet - Eugene Mah, M.Sc., DABR [EMAIL PROTECTED] Medical Physicist/Misplaced Canuck[EMAIL PROTECTED] Department of Radiology "For I am a Bear of Very Little Medical University of South Carolina Brain, and long words Bother Charleston, South Carolina me." Winnie the Pooh http://home.netcom.com/~eugenem/ PGP KeyID = 0x1F9779FD, 0x319393F4 PGP keys available on request ICQ 3113529 O- - - 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: newbie nagging
hi. this message means mysql is...well...reading table information for completion of table names. typing the beginning of a table or column name and pressing tab will either complete the name, or present a list of appropriate tables/columns (like in a bash shell). if you have a lot of tables, this can take a few seconds. turn off this feature if you want, by starting the client with mysql -A. if you change table names and want to rebuild the list of tables for completion, type 'rehash'. -ravi. -Original Message- From: gabriel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 4:25 PM To: mysql Subject: newbie nagging anyone have any idea what this means? and why it comes up? mysql> use mydatabase; Reading table information for compltion of table and coumn names You can turn off this feature to get a quicker startup with -A Database changed mysql> this only comes up for _some_ databases not all any helpful hints? - 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: cc/gcc during configure on solaris 2.8
hi. assuming you're using a bash-type shell and gcc is in /some/directory/gcc >PATH=$PATH:/some/directory >export PATH >echo $PATH otherwise: >setenv PATH /some/directory:${PATH} if more errors crop up, copy and paste the error message into google and see if any relevant results are returned. hth. -ravi. -Original Message- From: BW (ST) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 05, 2001 11:16 AM To: MySQL List Subject: cc/gcc during configure on solaris 2.8 During my attempt to configure the 3.23.41 source, I encountered the error: "configure: error: no acceptable cc found in $PATH". As I'm using gcc on this box, where/how do I identify gcc for configure to use properly? Thanks, Brian - 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: Query Question
if i'm understanding what you mean, it seems like you're getting a little too complicated. select Title, IF(Title LIKE "%TOMMY%", 1, 0) as check from inv where... ... order by check desc, Title this will return rows like this: +-+---+ | title | check | +-+---+ | a | 1 | | b | 1 | | c | 1 | | w | 1 | | z | 1 | | a | 0 | | h | 0 | | z | 0 | +-+---+ i.e. each subset (check=1 and check=0) sorted alphabetically. -ravi. -Original Message- From: Carl Schrader [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 12:13 PM To: Ravi Raman Cc: [EMAIL PROTECTED] Subject: Re: Query Question Close. Now I need to get the order correct. I need the order like Tommy Tommy Lee Baseball(matched with Tommy in the Content or Notes field) World Series (matched with Tommy in the Content or Notes field) I've been playing with something like: select Title, concat(IF(Title LIKE "%TOMMY%", 1, 0),LPAD(90-ASCII(left (Title,1)),2,'0')) as check from inv where (Title LIKE 'tommy%') OR (Content LIKE '%tommy%') OR (Notes LIKE '% tommy%') order by check desc but that doesn't get it close enough. Only compares the frist char in Title. I need a more robost idea... Ravi Raman wrote: > hi. > > select Title, IF(Title LIKE "%TOMMY%", 1, 0) as check > from inv where... > ... order by check desc; > > hth. > -ravi. > > -Original Message- > From: Carl Schrader [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 04, 2001 10:30 AM > To: [EMAIL PROTECTED] > Subject: Query Question > > I'm doing a query like: > > select Title from inv where Title LIKE '%TOMMY%' OR Content LIKE > '%TOMMY%' OR Notes LIKE '%TOMMY%' order by Title > > What I need is to have the results that match Title LIKE '%TOMMY%' to > appear first and then the rest. I have been doing 2 separate queries and > > filtering the first results from the second in a script. I would like to > > do this with a single query. Can that be done? > > - > 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: Query Question
hi. select Title, IF(Title LIKE "%TOMMY%", 1, 0) as check from inv where... ... order by check desc; hth. -ravi. -Original Message- From: Carl Schrader [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 10:30 AM To: [EMAIL PROTECTED] Subject: Query Question I'm doing a query like: select Title from inv where Title LIKE '%TOMMY%' OR Content LIKE '%TOMMY%' OR Notes LIKE '%TOMMY%' order by Title What I need is to have the results that match Title LIKE '%TOMMY%' to appear first and then the rest. I have been doing 2 separate queries and filtering the first results from the second in a script. I would like to do this with a single query. Can that be done? - 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
FW: Licensing terms for an Intranet site
-Original Message- From: Ravi Raman [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 12:05 PM To: Jay Fesco Subject: RE: Licensing terms for an Intranet site hi. i think this is jeremy's not-so-subtle way of bashing your choice of email client. check this link: http://www.rodos.net/outlook/#messageflag -ravi. -Original Message- From: Jay Fesco [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 12:01 PM To: Jay Fesco; [EMAIL PROTECTED] Subject: RE: Licensing terms for an Intranet site > > -- > > Jeremy D. Zawodny, <[EMAIL PROTECTED]> > > Technical Yahoo - Yahoo Finance > > Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 > > > Is anyone else getting a strange flag associated with Jeremy's email, or is it just me? Every one of his posts comes in flagged in Outlook, and the headers have a line which reads: X-message-flag: Mailbox corrupt. Please upgrade your mail software. This is definitely OT for this forum, but this forum is the only place where I see the problem. Jay database,sql,query,table - 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: Manipulation of data - batch processing!
hi. update Erf set PortionNumber = CONCAT('0', PortionNumber) where LENGTH(PortionNumber) = 4; update Erf set PortionNumber = CONCAT('00', PortionNumber) where LENGTH(PortionNumber) = 3; update Erf set PortionNumber = CONCAT('000', PortionNumber) where LENGTH(PortionNumber) = 2; update Erf set PortionNumber = CONCAT('', PortionNumber) where LENGTH(PortionNumber) = 1; have a nice weekend! -ravi. -Original Message- From: Liana Wiehahn [mailto:[EMAIL PROTECTED]] Sent: Friday, August 17, 2001 9:13 AM To: [EMAIL PROTECTED] Subject: Manipulation of data - batch processing! Hi I've got the following: Table: Erf Column Name : PortionNumber DataType: varchar(5) Records: 39000 The values of these records are all numbers that starts at 0 and ends at 200. I would like to insert one or more '0', infront of all the numbers to make sure that the length of each record are 5 numbers. I know how to update a single record, but obviously 39000 wouldn't allow me to have a weekend :) Liana [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: Downsides of MySQL?
hi. scroll down a bit. the _comments_, to which i was referring, go all the way up to July 2001, which seems fairly relevant to me. and while the article is definitely dated, transaction support in mysql is still not-quite-stable, it still lacks subqueries, stored procedures, triggers and foreign key constraints, which is important to know 1) if those things are important to you, and 2) if you're comparing it to oracle. so i'll stick by my statement that the link is "a page with _a lot_ of interesting comments from both sides of the commercial-RDBMS vs. mysql-postgres". -ravi. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 12:35 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Downsides of MySQL? "a page with _a lot_ of interesting comments from both sides of the commercial-RDBMS vs. mysql-postgres is here: http://openacs.org/philosophy/why-not-mysql.html"; This article is a year and a half old, quite a lot of its points, while valid at the time , simply are not relevant anymore. The introduction of innodb and gemini in particular make this a dead document. -----Original Message- From: Ravi Raman [mailto:[EMAIL PROTECTED]] Sent: 16 August 2001 07:59 To: Boget, Chris; [EMAIL PROTECTED] Subject: RE: Downsides of MySQL? lol. how "industrial strength" does this website need to be? if it's anything less than an online banking/creditcard processing site, you'll probably be okay. i know go2net, xoom, and realnetworks (among other large sites) all use mysql. admittedly, they also use oracle or db2 in the mix as well, but mysql's in there. i might agree that it "lacks enterprise management functionality", but that depends on what that extremely vague term means... to refute a few more points: mysql support can be purchased, with the advantage that you can influence the future development of the software by paying mysql ab...something that you'll never get from oracle. functionality-wise, mysql is missing (as a previous post this week noted) triggers, stored procedures and referential integrity constraints although row or at least page-level locking is implemented in some of the newer table types (innoDB +), as well as replication between a master and slave db. oops. wait...missed this part: "The fact that it is unsupported freeware would mean that an end user would potentially be "held to ransom" by a DBA with specific knowledge. The mySQL security model is also not sufficiently developed for any system that involves money. " i guess this is a system that involves money. while i agree that i wouldn't use mysql for _any_ app storing financial info, it's amusing that the quoted individual says mysql would invite a situation where the end user is "held ransom to" a DBA...if this is not the case with oracle, i don't know what is, except oracle involves huge license fees and higher-paid DBA with even more specific knowledge. that being said, and without knowing more details about the planned website, i'm leaning towards agreeing with person you quoted (personal opinion only!) one important thing to note is that it is not necessary, as many large websites have shown, to use oracle/db2/sybase _exclusively_...i have no doubt that mysql can handle at least some of the tasks necessary in a web-based system, the question of where it fits in and whether it's worth integrating is up to you guys. a page with _a lot_ of interesting comments from both sides of the commercial-RDBMS vs. mysql-postgres is here: http://openacs.org/philosophy/why-not-mysql.html hth. -ravi. -Original Message- From: Boget, Chris [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 9:36 AM To: '[EMAIL PROTECTED]' Subject: Downsides of MySQL? Good morning. Recently, we presented MySQL as a database option for a website that we might be working on. We've used it as our database in the past and we plan on using it in the future as possible. With that said, I confess I don't have as intimate a knowledge of mySQL to address some of the things in the email that was sent to me. I'd like to hear what some of you have to say/think about this. I know some of the things said below aren't entirely correct, but I'm not 100% sure about some of the others. --Begin Quote-- MySQL - as I said at our meeting, we would not be comfortable with this as an enterprise strength solution. MySQL is unsupported freeware and lacks enterprise management functionality. It has a small limited feature set compared to ORACLE, DB/2 and is lacking the functionality to support data replication and has little capability for generating management info. There are question marks around the scalability of the product, I'm not sure of the locking algorithms used (whether row level or record leve
RE: Downsides of MySQL?
lol. how "industrial strength" does this website need to be? if it's anything less than an online banking/creditcard processing site, you'll probably be okay. i know go2net, xoom, and realnetworks (among other large sites) all use mysql. admittedly, they also use oracle or db2 in the mix as well, but mysql's in there. i might agree that it "lacks enterprise management functionality", but that depends on what that extremely vague term means... to refute a few more points: mysql support can be purchased, with the advantage that you can influence the future development of the software by paying mysql ab...something that you'll never get from oracle. functionality-wise, mysql is missing (as a previous post this week noted) triggers, stored procedures and referential integrity constraints although row or at least page-level locking is implemented in some of the newer table types (innoDB +), as well as replication between a master and slave db. oops. wait...missed this part: "The fact that it is unsupported freeware would mean that an end user would potentially be "held to ransom" by a DBA with specific knowledge. The mySQL security model is also not sufficiently developed for any system that involves money. " i guess this is a system that involves money. while i agree that i wouldn't use mysql for _any_ app storing financial info, it's amusing that the quoted individual says mysql would invite a situation where the end user is "held ransom to" a DBA...if this is not the case with oracle, i don't know what is, except oracle involves huge license fees and higher-paid DBA with even more specific knowledge. that being said, and without knowing more details about the planned website, i'm leaning towards agreeing with person you quoted (personal opinion only!) one important thing to note is that it is not necessary, as many large websites have shown, to use oracle/db2/sybase _exclusively_...i have no doubt that mysql can handle at least some of the tasks necessary in a web-based system, the question of where it fits in and whether it's worth integrating is up to you guys. a page with _a lot_ of interesting comments from both sides of the commercial-RDBMS vs. mysql-postgres is here: http://openacs.org/philosophy/why-not-mysql.html hth. -ravi. -Original Message- From: Boget, Chris [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 9:36 AM To: '[EMAIL PROTECTED]' Subject: Downsides of MySQL? Good morning. Recently, we presented MySQL as a database option for a website that we might be working on. We've used it as our database in the past and we plan on using it in the future as possible. With that said, I confess I don't have as intimate a knowledge of mySQL to address some of the things in the email that was sent to me. I'd like to hear what some of you have to say/think about this. I know some of the things said below aren't entirely correct, but I'm not 100% sure about some of the others. --Begin Quote-- MySQL - as I said at our meeting, we would not be comfortable with this as an enterprise strength solution. MySQL is unsupported freeware and lacks enterprise management functionality. It has a small limited feature set compared to ORACLE, DB/2 and is lacking the functionality to support data replication and has little capability for generating management info. There are question marks around the scalability of the product, I'm not sure of the locking algorithms used (whether row level or record level) - the fact that it is not generally used in multi-user solutions is a good enough indication that this is not accepted database technology for industrial-strength multi-user systems. The fact that it is unsupported freeware would mean that an end user would potentially be "held to ransom" by a DBA with specific knowledge. The mySQL security model is also not sufficiently developed for any system that involves money. I would not be prepared to sign-off any solution containing mySQL. --End Quote-- I'd love to get your input. Thank you for your time and your knowledge. Chris - 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: State: "Writing to net"
hi and thanks for the responses. grigory: obviously local connections will be faster...but a query time difference of 2 seconds locally compared to 5 minutes for a machine on the same network (that can scp/ftp a 1 meg file in a few seconds) is a little strange. and at the risk of going offtopic, i'm attempting to track down what the cause of this is and how it could be improved... downloaded and installed tcpdump. as a disclaimer, IANANG. (network guy) ran it: [root@joker sbin]$ tcpdump -n host 10.10.10.31 no significant traffic between the boxes under regular circumstances. for smaller queries: select * from big_table limit 100, or 1000, or even 1, i receive a solid stream of lines like this, the amount obviously depending on the number of rows returned. 12:15:14.209326 10.10.10.12.4289 > 10.10.10.31.3306: . ack 617866 win 27512 (DF) 12:15:14.209427 10.10.10.31.3306 > 10.10.10.12.4289: P 617866:619314(1448) ack 538 win 32120 (DF) when i do a select * from big_table that returns the 53000 rows, i get around 13 lines of output, followed by a pause of almost exactly 30 seconds, then another 13-ish lines. this continues for a lng time. this time, although the query was executed from a different box (still close to the database server) i waited about 15 minutes for the query to complete, but finally killed the query process in mysql before it did. the other limit-ed queries executed in appropriate times...2 seconds, ~8 seconds, ~20 seconds respectively. what's up with that 30 second pause? does this look like a network problem to you guys? if it was, why would it not affect the 'limit 1' query as well? is there some sort of resource that mysql needs to process the 53000 rows that it might not have that would cause this? maybe different tcpdump options are in order for more pertinent information? again, thanks in advance for any ideas you may have. -ravi. -Original Message- From: mike cullerton [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 02, 2001 8:41 PM To: Ravi Raman; [EMAIL PROTECTED] Subject: Re: State: "Writing to net" being a network guy at heart, i'd like to see what tcpdump says is going over the ethernet card (if anything). does there appear to be traffic moving between the two machines, or is it caught in a buffer somewhere and hasn't even made it to the cable. since ftp works well, i'm guessing it isn't the physical network or anything at the ip layer. possibly getting data into the transport (tcp/udp) layer or above that. on 8/2/01 10:19 AM, Ravi Raman at [EMAIL PROTECTED] wrote: > hi. > > quick question... > i have a simple query that returns ~53000 rows. > > when connected to the mysql server from localhost, this query takes about 2 > seconds. > when connected to the mysql server from another box, this query takes about > 3-4 minutes. 'show processlist' shows the query state as "Writing to net" > for the majority of the query time. > these boxes are right next to each other (1 hop) and ftp and scp transfers > between them are quite fast. > > is this a network problem? > the load average on both machines is quite lowthey're running linux and > relatively recent versions of mysql. > what's going on here? > what does the "writing to net" state mean (besides the obvious)? couldn't > find any relevant docs. > > any input is appreciated. > > -ravi -- mike cullerton - 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: Error during make process on mySQL 3.23.40
hi. find ar...add it to your path..something like: PATH=$PATH:/usr/sbin export PATH type make again. hth. -ravi -Original Message- From: Alex Cook [mailto:[EMAIL PROTECTED]] Sent: Friday, August 03, 2001 2:19 PM To: '[EMAIL PROTECTED]' Subject: Error during make process on mySQL 3.23.40 ok, I'm running a Solaris 8 SPARC box, and I configure with: ./configure --enable-thread-safe-client --enable-shared --prefix=/usr2/mysql --enable-user=acook I then run make, use GNU make, and get: ar cru libreadline.a readline.o funmap.o keymaps.o vi_mode.o parens.o rltty.o co mplete.o bind.o isearch.o display.o signals.o util.o kill.o undo.o macro.o input .o callback.o terminal.o xmalloc.o history.o histsearch.o histexpand.o histfile. o nls.o search.o shell.o tilde.o make[2]: ar: Command not found make[2]: *** [libreadline.a] Error 127 make[2]: Leaving directory `/usr2/people/acook/mysql-3.23.40/readline' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr2/people/acook/mysql-3.23.40' make: *** [all-recursive-am] Error 2 Is there a different make then the GNU one I should use for the ar command, or is this a mySQL bug... pardon the newbie type question, but I'm a little stumped... -ALEX Web Designer, LibertyLiveWire 323-603-2118 [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
State: "Writing to net"
hi. quick question... i have a simple query that returns ~53000 rows. when connected to the mysql server from localhost, this query takes about 2 seconds. when connected to the mysql server from another box, this query takes about 3-4 minutes. 'show processlist' shows the query state as "Writing to net" for the majority of the query time. these boxes are right next to each other (1 hop) and ftp and scp transfers between them are quite fast. is this a network problem? the load average on both machines is quite lowthey're running linux and relatively recent versions of mysql. what's going on here? what does the "writing to net" state mean (besides the obvious)? couldn't find any relevant docs. any input is appreciated. -ravi - 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: auto_increment, is this a bug?? Where to report it?
hi. from the manual: If you delete the row containing the maximum value for an AUTO_INCREMENT column, the value will be reused with an ISAM, or BDB table but not with a MyISAM or InnoDB table. If you delete all rows in the table with DELETE FROM table_name (without a WHERE) in AUTOCOMMIT mode, the sequence starts over for all table types. what type is the table you're using? hth. -ravi. -Original Message- From: William N. Zanatta [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 3:54 PM To: mysql Subject: auto_increment, is this a bug?? Where to report it? Hello guys... I'm having problem with the auto_increment feature. I have a table like this... ++-+--+-+++ | Field | Type| Null | Key | Default| Extra | ++-+--+-+++ | Data | date| | | -00-00 | | | Edicao | int(3) unsigned | | PRI | NULL | auto_increment | | Status | varchar(6) | | || | ++-+--+-+++ When I make entries to this table, the column Edition goes... ++ | Edicao | ++ | 1 | | 2 | | 3 | ++ as expected. The problem is...if I delete the third entry (Edicao = 3), the next entry inserted should be 3, right?! Well it is not! It is 4. So I get a table like this... ++ | Edicao | ++ | 1 | | 2 | | 4 | ++ Well, I tested it on 2.33.37, 2.33.38 and 2.33.39. In 2.33.37 it was right...the entry was 3. But in the newer versions the number was 4. It's like the auto_increment pointer didn't do the decrement when I deleted the last entry. Is this a bug?! Where should it be reported to? Thank you all... William N. Zanatta - 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
EXPLAIN question
hi. ok, first actual question to the list, hope someone can help: the following query - select pn.number, c.ID, c.cost, c.days_valid, c.description from pinnumbers pn, cardtype c where pn.cardtypeID = c.ID and pn.tmaster = 0 order by c.ID, pn.number returns: 55033 rows in set (4 min 10.11 sec) pinnumbers has only about 8 rows, and cardtype has 2 rows. an explain shows this: +---+--+---++-+---+---+- + | table | type | possible_keys | key| key_len | ref | rows | Extra | +---+--+---++-+---+---+- + | pn| ref | tmster| tmster | 5 | const | 67580 | Using temporary; Using filesort | | c | ALL | PRIMARY | NULL |NULL | NULL | 2 | where used | +---+--+---++-+---+---+- + if i replace the first part of the query with "select count(pn.number) from...", i get: +--+ | count(pn.number) | +--+ |55033 | +--+ 1 row in set (0.81 sec) pretty fast. what's making it take so long? the join? as stated before, there are only 2 rows in cardtype. output from show index as follows: mysql> show index from pinnumbers; +++--+--+-+- --+-+--++-+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Comment | +++--+--+-+- --+-+--++-+ | pinnumbers | 1 | tmster |1 | tmaster | A |NULL | NULL | NULL | NULL| | pinnumbers | 0 | PRIMARY |1 | number | A | 8 | NULL | NULL | NULL| +++--+--+-+- --+-+--++-+ 2 rows in set (0.00 sec) mysql> show index from cardtype; +--++--+--+-+--- +-+--++-+ | Table| Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Comment | +--++--+--+-+--- +-+--++-+ | cardtype | 0 | PRIMARY |1 | ID | A | 2 | NULL | NULL | NULL| +--++--+--+-+--- +-+--++-+ 1 row in set (0.00 sec) any input would be gratefully appreciated, if the table descriptions would help, i'll post those. this seems like an easy join, but i'm confused as to what to do to speed it up. -ravi. - 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: Re[2]: AW: password-recovery for root-user?
the link got split over 2 lines when it was copied/pasted... manual_Privilege_system.html instead of manual_Privilege_system.h -ravi. -Original Message- From: Werner Stuerenburg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 11:25 AM To: Ravi Raman Cc: [EMAIL PROTECTED]; Rischbode, Horst; [EMAIL PROTECTED] Subject: Re[2]: AW: password-recovery for root-user? > http://www.mysql.com/documentation/mysql/bychapter/manual_Privilege_system.h FYI: The link you requested was not found. Sie schrieben am Mittwoch, 18. Juli 2001, 16:17:24: >>mysqld --skip-grant-tables > section 6.3 on this page: > http://www.mysql.com/documentation/mysql/bychapter/manual_Privilege_system.h > tml > -ravi. > -Original Message- > From: Andy Tanner [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 18, 2001 10:03 AM > To: Werner Stuerenburg; Rischbode, Horst > Cc: [EMAIL PROTECTED] > Subject: RE: AW: password-recovery for root-user? > Similarly - how about > - take a copy of you original mysql database tables > - overwrite the mysql database tables with the original installation tables > - login as root (the password will be blank) > - import your orignial tables back into the mysql database > good luck > Andy > -Original Message- > From: Werner Stuerenburg [mailto:[EMAIL PROTECTED]] > Sent: 18 July 2001 13:26 > To: Rischbode, Horst > Cc: [EMAIL PROTECTED] > Subject: Re: AW: password-recovery for root-user? > You can reinstall the complete system from scratch, if you are > superuser to that system. Would be the easiest way to do it, I > guess. >> I'm trying to get the root-password to be deleted or set to a >> new value without knowing the old password. (Forgotten...) > table > -- > Herzlich > Werner Stuerenburg > _ > ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen > Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409 > http://pferdezeitung.de > - > 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 -- Herzlich Werner Stuerenburg _ ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409 http://pferdezeitung.de - 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: AW: password-recovery for root-user?
>mysqld --skip-grant-tables section 6.3 on this page: http://www.mysql.com/documentation/mysql/bychapter/manual_Privilege_system.h tml -ravi. -Original Message- From: Andy Tanner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 10:03 AM To: Werner Stuerenburg; Rischbode, Horst Cc: [EMAIL PROTECTED] Subject: RE: AW: password-recovery for root-user? Similarly - how about - take a copy of you original mysql database tables - overwrite the mysql database tables with the original installation tables - login as root (the password will be blank) - import your orignial tables back into the mysql database good luck Andy -Original Message- From: Werner Stuerenburg [mailto:[EMAIL PROTECTED]] Sent: 18 July 2001 13:26 To: Rischbode, Horst Cc: [EMAIL PROTECTED] Subject: Re: AW: password-recovery for root-user? You can reinstall the complete system from scratch, if you are superuser to that system. Would be the easiest way to do it, I guess. > I'm trying to get the root-password to be deleted or set to a > new value without knowing the old password. (Forgotten...) table -- Herzlich Werner Stuerenburg _ ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409 http://pferdezeitung.de - 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: as seen on national television
hi. i have a question (or 2)... since this email doesn't contain the words "sql", "table", "database" or "query", is the reason it got through because of the "mysql" in the header/footer? that doesn't really make sense, because then everything would get through...maybe because of the word "profitable"? i realize writing a 100% accurate spamfilter is annoying, but perhaps someone could take a look at why the one we have is kind of wonky... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 13, 2001 7:24 AM To: [EMAIL PROTECTED] Subject: adv:as seen on national television I AM AS CONSERVATIVE AS IT GETS THIS REALLY WORKS. YOU WILL BE DEBT FREE FOR 2002...PLEASE READ BEFORE DELETING...THIS IS NOT A SPAM...YOU WILL BE DEBT FREE...YOU HAVE NOTHING TO LOSE BUT EVERYTHING TO GAIN All our mailings are sent complying to the proposed United States Federal requirements for commercial e-mail: Section 301 Paragraph (a)(2)(C) of S. 618. Please see the bottom of this message for further information and removal instructions. Dear Friend & Future Millionaire: AS SEEN ON NATIONAL TV: Making over half million dollars every 4 to 5 months from your home for an investment of only $25 U.S. Dollars expense one time THANK'S TO THE COMPUTER AGE AND THE INTERNET ! == BE A MILLIONAIRE LIKE OTHERS WITHIN A YEAR!!! Before you say ''Bull'', please read the following. This is the letter you have been hearing about on the news lately. Due to the popularity of this letter on the Internet, a national weekly news program recently devoted an entire show to the investigation of this program described below, to see if it really can make people money. The show also investigated whether or not the program was legal. Their findings proved once and for all that there are ''absolutely NO Laws prohibiting the participation in the program and if people can -follow the simple instructions, they are bound to make some mega bucks with only $25 out of pocket cost''. DUE TO THE RECENT INCREASE OF POPULARITY & RESPECT THIS PROGRAM HAS ATTAINED, IT IS CURRENTLY WORKING BETTER THAN EVER.. This is what one had to say: ''Thanks to this profitable opportunity.. I was approached many times before but each time I passed on it. I am so glad I finally joined just to see what one could expect in return for the minimal effort and money required. To my astonishment, I received total $610,470.00 in 21 weeks, with money still coming in." Pam Hedland, Fort Lee, New Jersey. === Here is another testimonial: "This program has been around for a long time but I never believed in it. But one day when I received this again in the mail I decided to gamble my $25 on it. I followed the simple instructions and walaa .. 3 weeks later the money started to come in. First month I only made $240.00 but the next 2 months after that I made a total of $290,000.00.. So far, in the past 8 months by re-entering the program, I have made over $710,000.00 and I am playing it again. The key to success in this program is to follow the simple steps and NOT change anything.'' More testimonials later but first, = PRINT THIS NOW FOR YOUR FUTUREREFERENCE == $ If you would like to make at least $500,000 every 4 to 5 months easily and comfortably, please read the following...THEN READ IT AGAIN and AGAIN!!! $ FOLLOW THE SIMPLE INSTRUCTION BELOW AND YOUR FINANCIAL DREAMS WILL COME TRUE, GUARANTEED! INSTRUCTIONS: =Order all 5 reports shown on the list below = For each report, send $5 CASH, THE NAME & NUMBER OF THE REPORT YOU ARE ORDERING and YOUR E-MAIL ADDRESS to the person whose name appears ON THAT LIST next to the report. MAKE SURE YOUR RETURN ADDRESS IS ON YOUR ENVELOPE TOP LEFT CORNER in case of any mail problems. === When you place your order, make sure you order each of the 5 reports. You will need all 5 reports so that you can save them on your computer and resell them. YOUR TOTAL COST $5 X 5=$25.00. Within a few days you will receive, vie e-mail, each of the 5 reports from these 5 different individuals. Save them on your computer so they will be accessible for you to send to the 1,000's of people who will order them from you. Also make a floppy of these reports and keep it on your desk in case something happen to your computer. IMPORTANT - DO NOT alter the names of the people who are listed next to each report, or their sequence on the list, in any way other than what is instructed below in step '' 1 through 6 '' or you will loose out on majority of your profits. Once you understand the way this works, you will also see how it does not work if you change it. Remember, this method has been tested, and if you alter, it will NOT work !!! People have tried to put their friends/relatives names on all
RE: Solaris
hi. www.sunfreeware.com has a sun package that can be added via the pkgadd utility. hth. -ravi. -Original Message- From: Mike Jimenez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 12:44 PM To: Steve Brazill; Mysql Subject: RE: Solaris Okay I can understand that I need to provide more info. Im using a Ultra sparc II server with Solaris 8 also can you please provide the exact link to the sunsolve website. Thanks Mike -Original Message- From: Steve Brazill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 9:30 AM To: Mike Jimenez; Mysql Subject: Re: Solaris I'd think that someone would have to had created a 'package' for Solaris installations, BUT, you'd have to identify which version of Solaris you were using, and whether you're running it on a SPARC or Intel based system I haven't seen them on the site (you could download the source file, compile it for your system, and create your own 'package'. Instructions are on the 'sunsolve' website) - Original Message - From: "Mike Jimenez" <[EMAIL PROTECTED]> To: "Mysql" <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 8:22 AM Subject: Solaris > Like you have a RPM install for Linux is there something similar that I can > use with Solaris to make the install simple with Mysql? > Thanks > Mike > - 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: Innodb
hi. make sure you have the right binary...i believe it's called mysql-max or something... hth. -ravi. -Original Message- From: Brandon Berry [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 4:55 PM To: Ravi Raman Subject: RE: Innodb It's a binary install. - Oso -Original Message----- From: Ravi Raman [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 4:41 PM To: Brandon Berry Subject: RE: Innodb hi. was mysql compiled with innodb support? ./ configure --with-innodb hth. -ravi. -Original Message- From: Brandon Berry [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 4:29 PM To: [EMAIL PROTECTED] Subject: Innodb Anybody know why when I enable the Innodb in the /etc/my.cnf it tells me can't init databases? - Oso - 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: MS-DOS
hi. use mysqlc instead of mysql when you start the client. hth. -ravi. -Original Message- From: Sibel Toprakkiran [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 2:35 PM To: [EMAIL PROTECTED] Subject: MS-DOS Hi, I'm starting mysql in a DOS window. Is there a possibility to use the arrow buttons to go up and down within the last used commands? thanks and regards, Sibel. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.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 - 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, update log, mysqldump???
hi. w/r/t your first question: mysqldump just generates a text file containing the sql statements necessary to recreate the dumped table(s). if you use mysqldump -uuser -p > dumpfile.txt you can open it in vi or notepad and edit it if desired... the error about the table existing is because the generated file by default has the table creation statement in it. use mysql -t or mysql --no-create-info to eliminate this. run mysqldump with no arguments to see the full usage info. the duplicate keys error would most likely be because you have existing rows in your table that conflict with the insert statements...pipe the output to a file instead of straight to mysql(if that's what you're doing), then check out what exactly's failing. 2nd question: replication's good if you need a 'live' secondary...for instance, at my last job we used a replicated secondary database to run intensive up-to-date statistic queries that otherwise would have locked important tables. (pre row-level locking table types, of course). if you just want backups made at intervals, i'd just dump all/important tables to a file periodically via cron. that's just me. hth. -ravi. -Original Message- From: Joe Taraba [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 04, 2001 1:48 PM To: [EMAIL PROTECTED] Subject: Replication, update log, mysqldump??? Hi; I'm trying to learn MySQL, having some difficulties understanding backup strategies. mysql Ver 9.38 Distrib 3.22.32, for pc-linux-gnu (i686) Where is the documentation (besides man pages) for mysql Ver 3.22.32 According to the the 3.23.29 online docs it appears that there are four ways to go: Replication update log mysqldump mysqlhotcopy script The mysqlhotcopy script is apparently not available for my version so I manually backed-up (copied) all the *.frm, *.MYD, and *.MYI files for each database, so I know the usefulness of that approach--sort'a. I tried mysqldump on an existing database, and then tried to load it back and got several types of errors. 1. Table exists errors, so I deleted all the *.frm, *.MYD, and *.MYI files for that database. 2. I tried to load the dumpfile again and got errors about duplicate keys. This database is not visible to anyone right now, so there were no activities going on. This is an exact copy of a functioning customer database. I haven't tried using the update log, nor do I fully understand it's usefulness. The online docs say not to use it for versions later than Now that master-slave internal replication is available starting in Version 3.23.15, using the update log to implement replications is not recommended. See section 11 Replication in MySQL. Replication, I guess is not available for my version either. I glanced briefly at the docs on Replication--it looks pretty nifty. So I guess there are actually two questions here: 1. Why the errors from mysqldump (reload) from an apparently perfectly good database? 2. Should I upgrade my version of MySQL and follow the Replication procedures? A ton of thanks from anyone not taking a holiday (USA) today. Joe - 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: Creating Table with a Default Datetime field
hi. assuming all inserts and updates never specify a value for UpdatedDate or CreationDate, on the initial insert: mysql> insert into table (Info) values ('blahblahblah'); they will both be set to '20010627125429' or something. any subsequent updates: mysql> update table set Info='somethingelse' where Info='blahblahblah'; will leave CreationDate as its original value, and change UpdatedDate to whatever the current timestamp is because it is first in the table description/create definition. hth. -ravi. -Original Message- From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 2:10 PM To: Ravi Raman Cc: Pete Harlan; Richard Bates; [EMAIL PROTECTED] Subject: RE: Creating Table with a Default Datetime field Wait, I didn't get the following: > an alternate solution is to have a table like this: > Create table( > UpdatedDatetimestamp(14), > CreationDatetimestamp(14), > Infovarchar(100) > ); > as mysql only automatically updates the _first_ timestamp column in a table. . Could you tell me more about it? And how does it solve thr problem? > > hth. > > -ravi. > > -Original Message- > From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 27, 2001 1:40 PM > To: Pete Harlan > Cc: Ravi Raman; Richard Bates; [EMAIL PROTECTED] > Subject: Re: Creating Table with a Default Datetime field > > > > > I, c. Then you just have to INSERT INTO it NOW() manually, that works > > > On Wed, 27 Jun 2001, Pete Harlan wrote: > > > TIMESTAMP is not the solution to his problem; he wants the date to > > default to now() when the record is created, not updated. > > > > There's currently no way to do this in MySQL; default values must be > > constants. > > > > --Pete > > > > > > > > > hi. > > > > > > check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column > > > type? > > > you can then format the date accordingly with...uh...DATE_FORMAT() in > your > > > select statements... > > > > > > hth. > > > -ravi > > > > > > > > > -Original Message- > > > From: Richard Bates [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, June 26, 2001 3:00 PM > > > To: [EMAIL PROTECTED] > > > Subject: Creating Table with a Default Datetime field > > > > > > > > > How do I get a default date time in the create table clause... > > > > > > I have tried > > > > > > Create table( > > > CreationDateDATETIMEDEFAULT NOW(), > > > Infovarchar(100) > > > ); > > > Create table( > > > CreationDateDATETIMEDEFAULT "NOW()", > > > Infovarchar(100) > > > ); > > > > > > Create table( > > > CreationDateDATETIMEDEFAULT SYSDATE(), > > > Infovarchar(100) > > > ); > > > Create table( > > > CreationDateDATETIMEDEFAULT "SYSDATE()", > > > Infovarchar(100) > > > ); > > > > > > Create table( > > > CreationDateDATETIMEDEFAULT CURRENT_DATE(), > > > Infovarchar(100) > > > ); > > > Create table( > > > CreationDateDATETIMEDEFAULT "CURRENT_DATE()", > > > Infovarchar(100) > > > ); > > > > > > All without the quote return with invalid syntax. > > > With the quote inserts "000-00-00 00:00:00" meaining invalid date. > > > == > > > === Richard Bates > > > === TELEHOUSE America > > > == > > > > > > > > > > > > - > > > 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
RE: Creating Table with a Default Datetime field
hi. an alternate solution is to have a table like this: Create table( UpdatedDatetimestamp(14), CreationDatetimestamp(14), Infovarchar(100) ); as mysql only automatically updates the _first_ timestamp column in a table. hth. -ravi. -Original Message- From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 1:40 PM To: Pete Harlan Cc: Ravi Raman; Richard Bates; [EMAIL PROTECTED] Subject: Re: Creating Table with a Default Datetime field I, c. Then you just have to INSERT INTO it NOW() manually, that works On Wed, 27 Jun 2001, Pete Harlan wrote: > TIMESTAMP is not the solution to his problem; he wants the date to > default to now() when the record is created, not updated. > > There's currently no way to do this in MySQL; default values must be > constants. > > --Pete > > > > > hi. > > > > check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column > > type? > > you can then format the date accordingly with...uh...DATE_FORMAT() in your > > select statements... > > > > hth. > > -ravi > > > > > > -Original Message- > > From: Richard Bates [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, June 26, 2001 3:00 PM > > To: [EMAIL PROTECTED] > > Subject: Creating Table with a Default Datetime field > > > > > > How do I get a default date time in the create table clause... > > > > I have tried > > > > Create table( > > CreationDateDATETIMEDEFAULT NOW(), > > Infovarchar(100) > > ); > > Create table( > > CreationDateDATETIMEDEFAULT "NOW()", > > Infovarchar(100) > > ); > > > > Create table( > > CreationDateDATETIMEDEFAULT SYSDATE(), > > Infovarchar(100) > > ); > > Create table( > > CreationDateDATETIMEDEFAULT "SYSDATE()", > > Infovarchar(100) > > ); > > > > Create table( > > CreationDateDATETIMEDEFAULT CURRENT_DATE(), > > Infovarchar(100) > > ); > > Create table( > > CreationDateDATETIMEDEFAULT "CURRENT_DATE()", > > Infovarchar(100) > > ); > > > > All without the quote return with invalid syntax. > > With the quote inserts "000-00-00 00:00:00" meaining invalid date. > > == > > === Richard Bates > > === TELEHOUSE America > > == > > > > > > > > - > > 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 > - 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: Creating Table with a Default Datetime field
hi. check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column type? you can then format the date accordingly with...uh...DATE_FORMAT() in your select statements... hth. -ravi -Original Message- From: Richard Bates [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 3:00 PM To: [EMAIL PROTECTED] Subject: Creating Table with a Default Datetime field How do I get a default date time in the create table clause... I have tried Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT "NOW()", Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT "SYSDATE()", Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT "CURRENT_DATE()", Infovarchar(100) ); All without the quote return with invalid syntax. With the quote inserts "000-00-00 00:00:00" meaining invalid date. == === Richard Bates === TELEHOUSE America == - 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: Design question
hi. the easiest way is to have an order table: (orderID, customer, address, etc., etc.) a item table: (itemID, description, price, etc.etc.) and an orderItems table: (orderID, itemID) this way you can select i.description, i.price from order o, item i, orderItems oi, where o.orderID = 1 and o.orderID = oi.orderID and oi.itemID = i.itemID or something like that. you could replace the customer/address columns in order with a customerID referencing a customer table as well... -ravi. -Original Message- From: Jeff Jones [mailto:[EMAIL PROTECTED]] Sent: Monday, June 18, 2001 3:00 PM To: [EMAIL PROTECTED] Subject: Design question I have a design problem I was hoping some of you could help me out with. I am writing a shopping cart system (as if there wasn't enough already) and I have one problem that has me stumped. A person can order more than one item of course. So let's say they order a kite and some string. Both of these have product numbers, and the overall order has an order number. I am trying to figure out how to design a table ( or tables ) so I can keep track of the different products that are ordered during one order. I need to keep track of the product number, quantity, and price for that product. For instance: Order # Products - -- 1 222 : Qty 1: 12.00 # 333 : Qty 2 : 14.00 That is order number 1 and that person ordered one of product # 222 @ 12.00 and 2 of product # 333 @14.00. I would appreciate any assistance any of you might be able to offer. If I wasn't clear enough, let me know and I will try and explain it better. Thanks. Jeff Jones - 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: Row to delete
hi. check out a book or online tutorial on database normalization. even a mildly normalized database will provide a way to uniquely reference a row. otherwise, you can use: delete from table1 where c1 = 10 and c2 = 'MySQL' limit 1; that will delete one row only, and if the rows are truly identical, it won't matter which of them (third one, first one, second one) you delete. -ravi. -Original Message- From: LAMULA LALLAL [mailto:[EMAIL PROTECTED]] Sent: Monday, June 11, 2001 2:47 AM To: [EMAIL PROTECTED] Subject: Row to delete Hi Can some one help me for this issue. When I have multiple rows with the same duplicated data in the table, how can I delete a perticular row only ? For example I have the table TABLE1 with C1 INT and C2 VARCHAR(20) with the following rows of data C1 C2 = 10 MySQL 20 MySQLAB 10 MySQL 10 MySQL If I want to delete only the 3rd row, with out deleting other rows. Is it possible in MySQL ? Thank you Lalal __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.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 - 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: Problems installing on Solaris 2.6
hi. rtfm. http://www.mysql.com/documentation/mysql/bychapter/manual_Installing.html#So laris -ravi. -Original Message- From: Aaron Williamson [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 3:06 PM To: [EMAIL PROTECTED] Subject: Problems installing on Solaris 2.6 I'm sure this has been beat into the ground here, but I've nowhere else to turn. When running ./configure --prefix=/usr/local/mysql I get the following error: configure: error: can not run test program while cross compiling Can anyone explain to me how to get around this? Thanks, Aaron - 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: Log HELP!
hi. if you're not on a windows box, try something like: mysql -uroot -p &1 | tee output.log the mysql client also has a --tee option, as well as a tee(\T) command that could be of use. -ravi. -Original Message- From: Mohammad Shoja [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 30, 2001 11:22 AM To: [EMAIL PROTECTED] Subject: Log HELP! Mybe this is not a mysql question but a unix command line question: would you please tell me how can I log execution of a DDL? I have a test.sql which is a DDL file, I wanna log its output but when I try the following it create log file but its empty. mysql -u root databasename log it Just send errors and logs to STDERR. Thanks you for your helps in advance. Regards -- Mohammadreza Shojatalab European Bioinformatics InstituteTel: +44 (0)1223 494 669 EMBL Outstation Fax: +44 (0)1223 494 468 Wellcome Trust Genome Campus E-Mail: [EMAIL PROTECTED] Hinxton, Cambridge URL: http://www.ebi.ac.uk/~shoja CB10 1SD, UK - 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: GROUPING
hi. okay...that's a different story. in oracle that could be done with a corellated subquery...in mysql there really is no easy way to do something like this. you could theoretically copy your information to a temporary table, and then select it out, but other than that, it seems you're out of luck. otherwise, you'll have to do this in 2 queries within your app. if anyone can point out something i'm overlooking (either re: your request or mysql), i'd be interested to know. -ravi. -Original Message- From: Rodrigo Gonzalez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 30, 2001 11:41 AM To: Ravi Raman; [EMAIL PROTECTED] Subject: Re: GROUPING I did this, but there is a problem I have to select all fields from the record returned, not just id and start, i need the other fields from the record with max start do you understand? - Original Message - From: "Ravi Raman" <[EMAIL PROTECTED]> To: "Rodrigo Gonzalez" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, May 30, 2001 12:37 PM Subject: RE: GROUPING > hi. > > select id, max(start) from your_table group by id; > > HTH. > -ravi. > > -Original Message- > From: Rodrigo Gonzalez [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 30, 2001 10:57 AM > To: [EMAIL PROTECTED] > Subject: GROUPING > > > Hi, > > I have to do a query but i don't know how to do this... > > I have this table > > id int > start time > stop time > ... > There are 2 to 4 rows for each id > > I have to select one row for each id where start is the max value between > all rows with this id > > If you have an idea please let me know > > 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
RE: GROUPING
hi. select id, max(start) from your_table group by id; HTH. -ravi. -Original Message- From: Rodrigo Gonzalez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 30, 2001 10:57 AM To: [EMAIL PROTECTED] Subject: GROUPING Hi, I have to do a query but i don't know how to do this... I have this table id int start time stop time ... There are 2 to 4 rows for each id I have to select one row for each id where start is the max value between all rows with this id If you have an idea please let me know 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
RE: SELECT question.
hi. left join the two tables then check for NOT NULL in one of the fields from invoiced that will be empty if they haven't been invoiced: SELECT l.load_no l.date FROM loads l LEFT JOIN invoiced i on l.load_no = i.load_no where i.invoiced_on_this_date IS NULL obviously, substitute a real column for invoiced_on_this_date... HTH. -ravi. -Original Message- From: Richard Reina [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 30, 2001 12:42 PM To: [EMAIL PROTECTED] Subject: SELECT question. I am stuck on a select query and was wondering if someone could help. I have I've written a database app. that helps me run my business (trucking). I need however to write a query that shows me all of the loads that are delivered but not billed (invoiced). Which means that I have to select the loads that are delivered but do not have an entry in the INVOICED table -- since an entry is made in the INVOICED table whenever a load is billed. I know the query below won't work. Can someone please help me fix it? SELECT l.load_no l.date FROM loads l, invoiced i WHERE l.dlvr_date > 0 AND l.load_no != i.load_no Thanks, Richard - 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: Novice mySQL and PHP problem
hi. this is a php question, and is offtopic for this list... ...but values in single quotes are sent without parsing to mysql from php. use " double quotes " instead. -ravi. -Original Message- From: Grosen Friis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 29, 2001 1:07 PM To: 'Scott Spearman'; '[EMAIL PROTECTED]' Subject: RE: Novice mySQL and PHP problem > -Original Message- > From: Scott Spearman [mailto:[EMAIL PROTECTED]] > Sent: 29. maj 2001 18:50 > To: [EMAIL PROTECTED] > Subject: Novice mySQL and PHP problem > > > When I do my query: > mysql_query(SELECT * FROM users WHERE name='$sentname'); > it always returns 0 elements. $sentname is comming from form > input on a > > page that POST's to my current page. I have checked this value and it > is what I expect, usually Scott for testing purposes. The > first record > in the table has name Scott, and I return that element if I > replace the > $sentname in the query with Scott. I'm fairly certain that this is a > simple string management problem and has an easy fix, but I'm at wits > end with this. > Thanks for your time, > Scott Spearman > [EMAIL PROTECTED] Hi Scott Have you tried to print out and verify the syntax of your SQL query: echo "SELECT * FROM users WHERE name='$sentname'"; What is being printed out? -- Regards Grosen Friis, Programmer -- The Stibo Group Søren Nymarks Vej 3 DK-8270 Højbjerg Aarhus, Denmark Phone +45 89 39 11 11 Direct +45 89 39 13 21 Fax +45 89 39 11 12 E-mail: [EMAIL PROTECTED] http://www.stibo.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
RE: Socks error connecting to mysql on localhost
hi. quick fix: if it's really in /var/lib/mysql/, just make a symlink in /tmp... > ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock not-so-quick fix: or, recompile php w/ the path to mysql and it should figure it out. -ravi. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 25, 2001 1:20 PM To: [EMAIL PROTECTED] Subject: Socks error connecting to mysql on localhost Hi, Using linux redhat 6.2, apache1.3.20 (compiled fresh), php4.0.5 (compiled fresh with msql support), mysql 3.23.38 (rpm install for server and client). I run the following php4 test script in query.php from a browser: snip-- snip-- I get the following errors when I view the souce in my browser Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /home/httpd/html/query.php on line 21 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /home/httpd/html/query.php on line 22 Warning: MySQL: A link to the server could not be established in /home/httpd/html/query.php on line 22 Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/query.php on line 23 mysql.sock is in /var/lib/mysql and not /tmp/mysql.sock. Can someone give me an idea as to what's wrong? Thanks, Frank - 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: No Curses/termcap library found
hi. do you have these installed? if not, install the libraries for ncurses and termcap. if you don't want to/can't install these, build mysql without the client. hth. -ravi -Original Message- From: Greg Robillard [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 5:41 PM To: [EMAIL PROTECTED] Subject: No Curses/termcap library found Help, I get this configuration error when trying to configure mysql. Any solutions. Greg Robillard - 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 a semi-complex select statement..
hi. i would suggest doing this in 2 queries, one to get the penalties, and one to get the goals...as you can only really get the "top 10" for one of them. if you want the top 10 leaders in penalty minutes, and the goals scored for that player, you can join the goals table in there as well and SUM() those up... select teams.TEAMNAME, players.PLAYERID, players.FIRSTNAME, players.LASTNAME, SUM(penalty.PENALTYMINUTES) as TPM from players left join penalty on players.PLAYERID = penalty.PLAYERID, teams where players.TEAMID = teams.TEAMID group by players.PLAYERID order by TPM desc limit 10; (this may or may not work/parse properly, as i didn't actually try it, YMMV, etc.etc.etc.) -ravi. -Original Message- From: Chad Day [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 23, 2001 10:59 AM To: [EMAIL PROTECTED] Subject: Help with a semi-complex select statement.. I have 4 tables, named: players - stores player id, name, team id teams - teamid, teamname goals - goals scored, player id, team id penalty - penaltys accumulated, player id What I'm trying to do is write a query to get the top 10 from any category and display them. I can do them individually fine, like so: SELECT players.PLAYERID, players.FIRSTNAME, players.LASTNAME, SUM(penalty.PENALTYMINUTES) as TTPM FROM players, penalty where (penalty.PLAYERID = players.PLAYERID) GROUP BY PLAYERID ORDER BY TTPM DESC LIMIT 10 but when I try to get the goal total as well or something and add another table to the from statement, I appear to be getting too many rows back as the numbers are inflated about 10 times what they should be .. the query I'm working with is: SELECT teams.TEAMNAME, players.PLAYERID, players.FIRSTNAME, players.LASTNAME, SUM(penalty.PENALTYMINUTES) as TPM, COUNT(goals.SCORER) as TGOALS FROM players, penalty, teams, goals where (penalty.PLAYERID = players.PLAYERID AND players.TEAMID = teams.TEAMID AND goals.SCORER = players.PLAYERID AND goals.TEAMID = teams.TEAMID) GROUP BY PLAYERID ORDER BY TPM DESC LIMIT 10 I'm not sure how I would go about re-writing it to get it to work properly, and humbly beg for assistance. Thanks, Chad - 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: installing mysql
hi. add the directory where 'ar' is to your path. PATH=$PATH:/path/to/ar; export PATH if i remember correctly, it should be in usr/ccs/bin. hth. -ravi -Original Message- From: Dana Sharvit [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 1:06 PM To: [EMAIL PROTECTED] Subject: installing mysql Hello, I am trying to install mysql(mysql-3.23.8-alpha) on Solaris2.8 with a prefix of the installation directory. the configure is ok but when I try to run make I get the following errors: sh: ar: not found *** Error code 1 make: Fatal error: Command failed for target `libreadline.a' Current working directory /aleph/sfx_version_1_1/src/mysql-3.23.8-alpha/readline *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /aleph/sfx_version_1_1/src/mysql-3.23.8-alpha *** Error code 1 make: Fatal error: Command failed for target `all-recursive-am' any ideas? Thanks Dana - 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: alter table change enum set
hi. put quotes around 'added'. -ravi. -Original Message- From: Abraham Ingersoll [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 2:40 PM To: [EMAIL PROTECTED] Subject: alter table change enum set Can anyone shed light on why this doesn't work, and perhaps tell me how I can ALTER the enum values .. or is this just not possible? mysql> ALTER TABLE nt_zone_record_log CHANGE COLUMN action action ENUM('added','modified','deleted') NOT NULL DEFAULT added; ERROR 1064: You have an error in your SQL syntax near 'added' at line 1 Thanks, Abe - 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: What is reference_priv used for?
hi. last i heard, it was unused... -ravi. -Original Message- From: Jose de Leon [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 2:13 PM To: [EMAIL PROTECTED] Subject: What is reference_priv used for? When granging privaleges for sql databases, what is the reference_priv privalege used for? I have check the online documentation and I can find no clear description of what this is used for. There are a few mentions of the reference_priv but only that it exists, not what it is used for. If there is a clear description in the documentation that I missed, please point me to the URL. If not, please describe how I would use this privilege. Thanks, Jose - 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: general newbie help
this one's okay: http://www.devshed.com/Server_Side/MySQL/Intro/ as well as various ones from here: http://www.google.com/search?q=mysql+tutorial -ravi. -Original Message- From: Scott Abbotts [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 10:27 AM To: [EMAIL PROTECTED] Subject: general newbie help I see most of you are experienced developers. Can someone point me in a direction (tutorial..) to learn MySQL? I've successfully set up phpMyAdmin on my site, but I'm afraid I'm still lost.. - 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 HA
I was wondering the exact same thing... Some possible meanings of HA: - Chemical symbol for Hahnium - High availability - Home automation - High Angle (Geometry) I'm guessing meaning #2, or maybe #3...? -Original Message- From: Billy Passauer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 4:00 PM To: carlos ospina; [EMAIL PROTECTED] Subject: RE: MySQL HA > -Original Message- > From: carlos ospina [mailto:[EMAIL PROTECTED]] > > I wanna know if someone has ever setup any kind o HA with MySQL. OK, I'll bite. What is an "HA" ? - 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: Newbie group/count query question
hi. your table looks something like this: table1 - date(date) order_number int(6) ...i wasn't sure if "order_number" is referring to a "order" table somewhere... if there are multiple rows for each day, and you want to add up "order_number" for each day, use: select DAYOFMONTH(date) as d, SUM(order_number) from table1 group by d if you want to count the rows per day (which i think is what you're after), use: select DAYOFMONTH(date) as d, count(order_number) from table1 group by d you probably want to add in a where clause where MONTH(date) = 4 to limit the rows to all days in april, for example. hth. -ravi. -Original Message- From: Graham Nichols [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 11:23 AM To: [EMAIL PROTECTED] Subject: Newbie group/count query question I have a table which contains a date column and an order_number column. I need to formulate a query syntax to return the total number of orders for each day in a given month (if any). Can someone help me with the syntax please as I've been stumbling around with it all day without success. Many thanks, Graham - 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: Computer Exploded!!!
hi. a link to the relevant section of the manual might be more helpful. http://www.mysql.com/doc/F/u/Fulltext_Search.html -ravi. -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 9:25 AM To: Selvin Sakal Cc: [EMAIL PROTECTED] Subject: Re: Computer Exploded!!! 1. Read the manual 2. Read the manual 3. get a book on SQL Selvin Sakal wrote: > My computer didn't explode i just wrote that to get attention. My question > is this - I have a database with a table which looks like this - > > CREATE TABLE sites > ( > ID INT NOT NULL AUTO_INCREMENT, > name VARCHAR(30) NOT NULL, > keywords VARCHAR(200) NOT NULL DEFAULT 0, > description VARCHAR(200) NOT NULL DEFAULT 0, > url VARCHAR(50) NOT NULL, > rank blob NOT NULL, > PRIMARY KEY (ID) > ); > > there is a index on keywords and description > > what i would like to know is how to search description to see if it > contains a word like 'web'. > > i would also like to know how to search description and keyword for > specific > words like this - > > say description has 'the best search engine on the net' > > i want to search for all the descriptions that contain 'best' and 'net'. > > If i don't get help soon my computer might explode. > > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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 -- Gerald L. Clark [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: Help needed with Query
hi. by skimming that query, the first thing that will take a long time is the 'description like "%GABA%"' part...that's a pretty inefficient method of searching due to the wildcard at the beginning of the string. if there are no indexes on the tables, you should probably add some. "show index from tablename" will tell you for sure. check out the mysql manual section re: indexes for more information...also use the keyword EXPLAIN before the select query to find out where/if indexes are being used and where they would likely be the most helpful. hth. -ravi. -Original Message- From: Bryan Coon [mailto:[EMAIL PROTECTED]] Sent: Friday, April 27, 2001 4:20 PM To: '[EMAIL PROTECTED]' Subject: Help needed with Query I am working on a mysql database with many large tables (1.5 million rows on some) and came across a beeg problem. I have need for a query like this: mysql> select distinct subsnp_pk as sqnmid, c.chrom, chrompos, source as panel, null as first_pcrp, null as second_pcrp, null as prb_seq, null as term, null as validation, null as freq, null as population from locuslink l, subsnp left outer join chromosome_position c on subsnp_pk = c.snp_fk left outer join locus_annotation a on subsnp_pk = a.snp_fk where a.locusid = substring(l.locusid, 4) and description like '%GABA%' order by subsnp_pk; Which seems insane. This 4 table join in another situation would become a 6 table join. As it is, it takes 1min 10.60 seconds for this query to return one result. Clearly I am not a MySQL expert, and even though this query works, there must be a better way to do this. Is it a matter of indexing? A matter of poor schema design? Poor query design? Is it unavoidable? As far as I know, none of the tables are indexed (I did not set up the schema). Please let me know if more info is required to help with this. Thanks, Bryan - 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 anyone help me.. for install on a Freebsd 4.2 box..
if you've downloaded the binary, then you don't need to configure, just like the error says... read this page, http://www.mysql.com/doc/I/n/Installing_binary.html then this one: http://www.mysql.com/doc/P/o/Post-installation.html hth. (and don't forget to cc replies to the list [[EMAIL PROTECTED]] for posterity) -ravi. -Original Message- From: Larry Caragay [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 5:02 PM To: Ravi Raman Subject: RE: Can anyone help me.. for install on a Freebsd 4.2 box.. Hi Ravi, The problem I get is after the ./configure --prefix=/usr/local/mysql There is a error at the "make" part.. it say: one# ./configure --prefix=/usr/local/mysql NOTE: This is a MySQL binary distribution. It's ready to run, you don't need to configure it! To help you a bit, I am now going to create the needed MySQL databases and start the MySQL server for you. If you run into any trouble, please consult the MySQL manual, that you can find in the Docs directory. Installing all prepared tables To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: ./bin/mysqladmin -u root -p password 'new-password' ./bin/mysqladmin -u root -h one.nasala.com -p password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run the ./bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd . ; ./bin/safe_mysqld & You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; run-all-tests Please report any problems with the ./bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com Starting the mysqld server. You can test that it is up and running with the command: ./bin/mysqladmin version one# A mysqld process already exists make make: no target to make. Larry -Original Message- From: Ravi Raman [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 12:57 PM To: Larry Caragay; [EMAIL PROTECTED] Subject: RE: Can anyone help me.. for install on a Freebsd 4.2 box.. hi. the easiest way would be to use the port. otherwise ./configure (--with-some-options); make; make install and hope for the best... more realistically, do the commands one by one, and deal w/ the error messages as they pop up. is there specific information that is not on these pages ( http://www.mysql.com/doc/Q/u/Quick_install.html ) that you were looking for? hth. -ravi. -Original Message- From: Larry Caragay [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 2:37 PM To: [EMAIL PROTECTED] Subject: Can anyone help me.. for install on a Freebsd 4.2 box.. Would anyone out there have the installation instruction for Mysql for a FreeBSD 4.2 box??? Larry P.S. Thanks in advance... - 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: Can anyone help me.. for install on a Freebsd 4.2 box..
hi. the easiest way would be to use the port. otherwise ./configure (--with-some-options); make; make install and hope for the best... more realistically, do the commands one by one, and deal w/ the error messages as they pop up. is there specific information that is not on these pages ( http://www.mysql.com/doc/Q/u/Quick_install.html ) that you were looking for? hth. -ravi. -Original Message- From: Larry Caragay [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 2:37 PM To: [EMAIL PROTECTED] Subject: Can anyone help me.. for install on a Freebsd 4.2 box.. Would anyone out there have the installation instruction for Mysql for a FreeBSD 4.2 box??? Larry P.S. Thanks in advance... - 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: getting started...the hardest part
hi. "GNU `tar' saves many files together into a single tape or disk archive, and can restore individual files from the archive." gnu tar differs from the sun version of tar that comes with solaris. type tar --help to see which tar you have. if you need the gnu version, you can get it from www.sunfreeware.com hth. -ravi -Original Message- From: Simon Chan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 12:48 PM To: [EMAIL PROTECTED] Subject: getting started...the hardest part Hi Everybody! Just starting to teach myself MySql and databases. I have the O'Reilly books on Perl DBI and Mysql, msql. My question is this: I am trying to install mysql on sparc sun solaris 2.7 machine. I found a binary version in the downloads page of mysql.com (is is called Sun Solaris (Sparc)[sun-soalris2.7-sparc] ) what exactly is the "GNU Tar" command? How do I install mysql with it? Any help would be much appreciated. Many thanks everybody! Sincerely, Simon Chan __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.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 - 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: Output from select is not what expected
hi. a join across 3 tables with 2 records each will return 8 rows...2*2*2 = 8. hth. -ravi. -Original Message- From: Fates [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 9:38 AM To: [EMAIL PROTECTED] Subject: Output from select is not what expected I have three tables in a database called menus and I have added 2 records to each table so 2*3=6 records. Why is it when I do a "select * from table1, table2, table3" I get 8 records back when there are only 2 records in each table? What am I doing wrong? Some of the fields are references if that makes a difference? I want to list the output from all tables together. Using Latest MySQL RedHat Linux RPM -- This email was sent using w3mail. - 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: Apache upgrade goof up?
hi. the mysql code is compiled into the PHP module within apache, so apache wouldn't know anything about it. if you do a you can find out information about the mysql version that php is using. hth. -ravi. -Original Message- From: N6REJ [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 10:29 AM To: [EMAIL PROTECTED] Subject: Apache upgrade goof up? I think I might have goofed somewhere. I just upgraded Mysql and apache and php on my server, and the server logs state Apache/1.3.19 (Unix) PHP/4.0.4pl1 mod_ssl/2.8.2 OpenSSL/0.9.5a configured -- resuming normal operations but should'nt it also say something about mysql being tied in to? Troy [EMAIL PROTECTED] "I do not understand what I do, for what I want to do I do not do but what I hate I do" Rom 7:15 NIV --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.249 / Virus Database: 122 - Release Date: 04/13/01 - 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: adding columns to my database
hi. alter table sometable add column newcol VARCHAR(20) after oldcol; change sometable, newcol, oldcol and the column definition to what you want. hth. -ravi. -Original Message- From: Dean MacIsaac Jr. [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 3:04 PM To: [EMAIL PROTECTED] Subject: adding columns to my database I'm just not understanding what I'm reading in Ch. 7. I created a table, in my database, now I just want to add 2 more varchar columns to it. I tried following along with the manual, but, I'm not seeing it, and I get errors every time in telnet. If someone would be so kind as to help me, I appreciate it. Sincerely, Dean MacIsaac Webmaster www.starabilias.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
RE: Someone give me suggestion please?
hi. according to this: http://www.mysql.com/documentation/mysql/bychapter/manual_Installing.html the binary is recommended for linux. if you know what you're doing, or want support for wacky options, compile your own. instructions for both options are on the above page as well. hth. -ravi. -Original Message- From: David Loszewski [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 4:40 PM To: [EMAIL PROTECTED] Subject: Someone give me suggestion please? is it recommended to install mysql by rpm or tar? dave - 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: Perl-MySql DBD Errors
hi. don't know how much light this will shed on your situation, but mysql.h is in the include directory under the directory where you installed mysql. (i.e /opt/mysql/include or /usr/local/mysql/include) hth. hand. -ravi -Original Message- From: Eric Fegraus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 04, 2001 3:24 PM To: [EMAIL PROTECTED] Subject: Perl-MySql DBD Errors Hello, I have redhat 7.0 with Mysql Ver 8.8 Distrib 3.23.22-beta. This was the Mysql version that came on the redhat cd's. Perl and the Perl DBI are installed and working correctly. MySql seems to be working correctly as well(i.e. no problems with permissions, created db's, tables, etc). However, I can't install the mysql::DBD...I grabbed this from the Mysql site, Msql-Mysql-modules-1.2215.tar. For the life of me I can't find the mysql.h file that it keeps asking for? Any ideas where this is...is it a bug with this version. Thanks in advance! 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
RE: Password option
hi. log in as root, kill the mysqld process. restart mysqld with the --skip-grant option. once it is running you can connect and alter the password directly in the 'mysql' table. maybe a flush privileges to reload the permissions after that? you really just forgot the password you typed, didn't you? :] -ravi -Original Message- From: Jared Rogge [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 21, 2001 1:42 PM To: '[EMAIL PROTECTED]' Subject: Password option I have recently tried to install a new Trouble Ticket application on a Unix machine that was previously administered by somebody else. They have set a password to MySQL and I cannot into it of course. Does anybody know how to reset or disable this feature if you have root access to the machine? 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 - 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: Second Request - Limit Filed Input
Hi. It's kind of counter-intuitive to me as well, but the rationale is that there obviously was an error if you have a "" value for an ENUM column. this theoretically allows you at some later time to use that indicator to do some sort of error-check or update/delete all erroneous rows, or whatever you decide to do. ...in other words, it's a feature, not a bug. -ravi. -Original Message- From: Bill Marrs [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 20, 2001 12:48 PM To: [EMAIL PROTECTED] Subject: RE: Second Request - Limit Filed Input At 11:22 AM 3/20/2001 -0500, Ravi Raman wrote: >You can use an ENUM column type assuming the numerical range is less than >65535 numbers. > >http://www.mysql.com/doc/E/N/ENUM.html One problem I've seen with enums is that I end up with a blank ('') field if I try to insert a row with a value in the enum column that doesn't fit. Is there a way to get the insert to fail on "bad input" instead? For example: mysql> CREATE TABLE Stats ( -> Status enum('good','bad') NOT NULL -> ); Query OK, 0 rows affected (0.00 sec) mysql> INSERT INTO Stats VALUES ('neither'); Query OK, 1 row affected (0.00 sec) (Can I get this insert to FAIL instead? because...) mysql> select * FROM Stats; ++ | Status | ++ || ++ 1 row in set (0.01 sec) (this isn't always a good thing). -bill - 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: Second Request - Limit Filed Input
Hi. You can use an ENUM column type assuming the numerical range is less than 65535 numbers. http://www.mysql.com/doc/E/N/ENUM.html -ravi. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 20, 2001 11:05 AM To: [EMAIL PROTECTED] Subject: Second Request - Limit Filed Input Is there a way in MySQL to limit the values that a (numeric) field can hold. For example if I want a given field to only have the values 1 - 10 can I do this and can it be done in the definition of the field when the table is created? - 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: Selecting random rows with MySQL 3.22?
You're selecting your index column [ID] for every record and generating a column containing a random number [ID*0+RAND()], ordering by the random column [ORDER BY rand], and then just grabbing the first record [LIMIT 1]. the RAND() function generates random numbers. In my version of mysql (most recent) this simpler query does the same thing: select ID, rand() as rand from partner order by rand limit 1 which is probably easier to understand, but YMMV. -ravi. -Original Message- From: Chris Boot [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 3:53 PM To: MySQL Mailing List; Ravi Raman Subject: Re: Selecting random rows with MySQL 3.22? Hi, > for mysql < 3.23 you can do something like this. > > select ID, ID*0+rand() as rand from partner order by rand limit 1 Thanks a million for the speedy response! It works like a charm! I don't quite understand how it works though... Could anyone explain? I really don't like knowing something without knowing how it works. Best wishes, -- .-. Chris Boot /v\ [EMAIL PROTECTED] // \\ /( )\L I N U X ^^-^^>Phear the Penguin< - 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: Selecting random rows with MySQL 3.22?
Hi. for mysql < 3.23 you can do something like this. select ID, ID*0+rand() as rand from partner order by rand limit 1 have fun. -ravi. -Original Message- From: Chris Boot [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 3:16 PM To: MySQL Mailing List Subject: Selecting random rows with MySQL 3.22? Hi, I'm sure this has been covered before, so I'm sorry for repeating the question. A search of the list archives yielded nothing. What I need to do is grab one random row from a table. What I would do in MySQL 3.23 is: SELECT * FROM fid_links WHERE featured='yes' ORDER BY RAND() LIMIT 1 How can I do this 3.22? Upgrading to 3.23 is not an option at the moment. Thanks in advance, -- .-. Chris Boot /v\ [EMAIL PROTECTED] // \\ /( )\L I N U X ^^-^^>Phear the Penguin< - 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: column types
Hi. If you want to store the binary images in the database, the column type will most likely be a BLOB assuming the images are not bigger that 60k. If you want to store just url or file paths (http://www.myhost.com/pict.jpg or /home/bob/image.gif) use a VARCHAR(XX) where XX is a reasonable length of what you think the longest link will be. 30? 50? Have fun. -ravi. -Original Message- From: Mike Baerwolf [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 4:02 PM To: [EMAIL PROTECTED] Subject: column types Hello, Just starting out with MySQL. I like to put images or links to images in a database, Is this possible? If so what would be the column type be? Thanks for the help Mike - 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