Fulltext Simple Question
Hello, I am running 4.0.15 for Win95/98 and am working through the docs. I created a text type field with a 'fulltext' index. As I am experimenting, I have run into a couple of questions: First off, I was having trouble getting results. So I added the word foobar to one of the descriptions: and that worked with this query: select * from item where match(name, description) against('foobar') I have a word 'red' that appears 5-10 times, in a tmp table of 60 records. If I run that query with 'red' select * from item where match(name, description) against('red'); it returns empty set Upon reading, it looks like it is really trying to only get unique names from the index. But in my case the 'red' is a description that I would like to get back. Anyway to force this to return results? Any info would be helpful. I have read, but it gets a little confusing first time through. Thanks, Scott -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Fulltext Simple Question
Scott - Check this excerpt out ( http://dev.mysql.com/doc/mysql/en/fulltext-search.html ) from the MySQL Documentation. I hope it helps! --bemansell ... Every correct word in the collection and in the query is weighted according to its significance in the collection or query. This way, a word that is present in many documents has a lower weight (and may even have a zero weight), because it has lower semantic value in this particular collection. Conversely, if the word is rare, it receives a higher weight. The weights of the words are then combined to compute the relevance of the row. Such a technique works best with large collections (in fact, it was carefully tuned this way). For very small tables, word distribution does not adequately reflect their semantic value, and this model may sometimes produce bizarre results. For example, although the word ``MySQL'' is present in every row of the articles table, a search for the word produces no results: mysql SELECT * FROM articles - WHERE MATCH (title,body) AGAINST ('MySQL'); Empty set (0.00 sec) The search result is empty because the word ``MySQL'' is present in at least 50% of the rows. As such, it is effectively treated as a stopword. For large datasets, this is the most desirable behavior---a natural language query should not return every second row from a 1GB table. For small datasets, it may be less desirable. A word that matches half of rows in a table is less likely to locate relevant documents. In fact, it most likely finds plenty of irrelevant documents. We all know this happens far too often when we are trying to find something on the Internet with a search engine. It is with this reasoning that rows containing the word are assigned a low semantic value for *the particular dataset in which they occur*. A given word may exceed the 50% threshold in one dataset but not another. The 50% threshold has a significant implication when you first try full-text searching to see how it works: If you create a table and insert only one or two rows of text into it, every word in the text occurs in at least 50% of the rows. As a result, no search returns any results. Be sure to insert at least three rows, and preferably many more. On 5/25/05, Scott Purcell [EMAIL PROTECTED] wrote: Hello, I am running 4.0.15 for Win95/98 and am working through the docs. I created a text type field with a 'fulltext' index. As I am experimenting, I have run into a couple of questions: First off, I was having trouble getting results. So I added the word foobar to one of the descriptions: and that worked with this query: select * from item where match(name, description) against('foobar') I have a word 'red' that appears 5-10 times, in a tmp table of 60 records. If I run that query with 'red' select * from item where match(name, description) against('red'); it returns empty set Upon reading, it looks like it is really trying to only get unique names from the index. But in my case the 'red' is a description that I would like to get back. Anyway to force this to return results? Any info would be helpful. I have read, but it gets a little confusing first time through. Thanks, Scott -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
Re: Fulltext Simple Question
Brian Mansell [EMAIL PROTECTED] wrote on 05/25/2005 03:09:03 PM: Scott - Check this excerpt out ( http://dev.mysql.com/doc/mysql/en/fulltext-search.html ) from the MySQL Documentation. I hope it helps! --bemansell ... Every correct word in the collection and in the query is weighted according to its significance in the collection or query. This way, a word that is present in many documents has a lower weight (and may even have a zero weight), because it has lower semantic value in this particular collection. Conversely, if the word is rare, it receives a higher weight. The weights of the words are then combined to compute the relevance of the row. Such a technique works best with large collections (in fact, it was carefully tuned this way). For very small tables, word distribution does not adequately reflect their semantic value, and this model may sometimes produce bizarre results. For example, although the word ``MySQL'' is present in every row of the articles table, a search for the word produces no results: mysql SELECT * FROM articles - WHERE MATCH (title,body) AGAINST ('MySQL'); Empty set (0.00 sec) The search result is empty because the word ``MySQL'' is present in at least 50% of the rows. As such, it is effectively treated as a stopword. For large datasets, this is the most desirable behavior---a natural language query should not return every second row from a 1GB table. For small datasets, it may be less desirable. A word that matches half of rows in a table is less likely to locate relevant documents. In fact, it most likely finds plenty of irrelevant documents. We all know this happens far too often when we are trying to find something on the Internet with a search engine. It is with this reasoning that rows containing the word are assigned a low semantic value for *the particular dataset in which they occur*. A given word may exceed the 50% threshold in one dataset but not another. The 50% threshold has a significant implication when you first try full-text searching to see how it works: If you create a table and insert only one or two rows of text into it, every word in the text occurs in at least 50% of the rows. As a result, no search returns any results. Be sure to insert at least three rows, and preferably many more. On 5/25/05, Scott Purcell [EMAIL PROTECTED] wrote: Hello, I am running 4.0.15 for Win95/98 and am working through the docs. I created a text type field with a 'fulltext' index. As I am experimenting, I have run into a couple of questions: First off, I was having trouble getting results. So I added the word foobar to one of the descriptions: and that worked with this query: select * from item where match(name, description) against('foobar') I have a word 'red' that appears 5-10 times, in a tmp table of 60 records. If I run that query with 'red' select * from item where match(name, description) against('red'); it returns empty set Upon reading, it looks like it is really trying to only get unique names from the index. But in my case the 'red' is a description that I would like to get back. Anyway to force this to return results? Any info would be helpful. I have read, but it gets a little confusing first time through. Thanks, Scott The other thing to remember is the minimum word length. By default it is set to 4. RED has only 3 characters so it would not have been indexed. That would explain why FT searches for RED is not returning any records. See here for FT tuning (settings): http://dev.mysql.com/doc/mysql/en/fulltext-fine-tuning.html
RE: Fulltext Simple Question
Thanks Sean fo the info. I see where it states the server is configured for 4 character indexing. I would like to try and set it to 3 and do not understand what an options file is: The documentation states the following: * The minimum and maximum length of words to be indexed is defined by the ft_min_word_len and ft_max_word_len system variables (available as of MySQL 4.0.0). See http://dev.mysql.com/doc/mysql/en/server-system-variables.html Section 5.3.3, Server System Variables. The default minimum value is four characters. The default maximum depends on your version of MySQL. If you change either value, you must rebuild your FULLTEXT indexes. For example, if you want three-character words to be searchable, you can set the ft_min_word_len variable by putting the following lines in an option file: [mysqld] ft_min_word_len=3 I use mysql from a binary install, and I am just learning it. How do I create this file, and where does it go? Thanks, Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 25, 2005 2:21 PM To: Brian Mansell Cc: mysql@lists.mysql.com; Scott Purcell Subject: Re: Fulltext Simple Question Brian Mansell [EMAIL PROTECTED] wrote on 05/25/2005 03:09:03 PM: Scott - Check this excerpt out ( http://dev.mysql.com/doc/mysql/en/fulltext-search.html ) from the MySQL Documentation. I hope it helps! --bemansell ... Every correct word in the collection and in the query is weighted according to its significance in the collection or query. This way, a word that is present in many documents has a lower weight (and may even have a zero weight), because it has lower semantic value in this particular collection. Conversely, if the word is rare, it receives a higher weight. The weights of the words are then combined to compute the relevance of the row. Such a technique works best with large collections (in fact, it was carefully tuned this way). For very small tables, word distribution does not adequately reflect their semantic value, and this model may sometimes produce bizarre results. For example, although the word ``MySQL'' is present in every row of the articles table, a search for the word produces no results: mysql SELECT * FROM articles - WHERE MATCH (title,body) AGAINST ('MySQL'); Empty set (0.00 sec) The search result is empty because the word ``MySQL'' is present in at least 50% of the rows. As such, it is effectively treated as a stopword. For large datasets, this is the most desirable behavior---a natural language query should not return every second row from a 1GB table. For small datasets, it may be less desirable. A word that matches half of rows in a table is less likely to locate relevant documents. In fact, it most likely finds plenty of irrelevant documents. We all know this happens far too often when we are trying to find something on the Internet with a search engine. It is with this reasoning that rows containing the word are assigned a low semantic value for *the particular dataset in which they occur*. A given word may exceed the 50% threshold in one dataset but not another. The 50% threshold has a significant implication when you first try full-text searching to see how it works: If you create a table and insert only one or two rows of text into it, every word in the text occurs in at least 50% of the rows. As a result, no search returns any results. Be sure to insert at least three rows, and preferably many more. On 5/25/05, Scott Purcell [EMAIL PROTECTED] wrote: Hello, I am running 4.0.15 for Win95/98 and am working through the docs. I created a text type field with a 'fulltext' index. As I am experimenting, I have run into a couple of questions: First off, I was having trouble getting results. So I added the word foobar to one of the descriptions: and that worked with this query: select * from item where match(name, description) against('foobar') I have a word 'red' that appears 5-10 times, in a tmp table of 60 records. If I run that query with 'red' select * from item where match(name, description) against('red'); it returns empty set Upon reading, it looks like it is really trying to only get unique names from the index. But in my case the 'red' is a description that I would like to get back. Anyway to force this to return results? Any info would be helpful. I have read, but it gets a little confusing first time through. Thanks, Scott The other thing to remember is the minimum word length. By default it is set to 4. RED has only 3 characters so it would not have been indexed. That would explain why FT searches for RED is not returning any records. See here for FT tuning (settings): http://dev.mysql.com/doc/mysql/en/fulltext-fine-tuning.html
RE: Fulltext Simple Question
Scott Purcell [EMAIL PROTECTED] wrote on 05/25/2005 03:35:54 PM: Thanks Sean fo the info. I see where it states the server is configured for 4 character indexing. I would like to try and set it to 3 and do not understand what an options file is: The documentation states the following: * The minimum and maximum length of words to be indexed is defined by the ft_min_word_len and ft_max_word_len system variables (available as of MySQL 4.0.0). See http://dev.mysql.com/doc/mysql/en/server- system-variables.html Section 5.3.3, Server System Variables. The default minimum value is four characters. The default maximum depends on your version of MySQL. If you change either value, you must rebuild your FULLTEXT indexes. For example, if you want three- character words to be searchable, you can set the ft_min_word_len variable by putting the following lines in an option file: [mysqld] ft_min_word_len=3 I use mysql from a binary install, and I am just learning it. How do I create this file, and where does it go? Thanks, Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 25, 2005 2:21 PM To: Brian Mansell Cc: mysql@lists.mysql.com; Scott Purcell Subject: Re: Fulltext Simple Question Brian Mansell [EMAIL PROTECTED] wrote on 05/25/2005 03:09:03 PM: Scott - Check this excerpt out ( http://dev.mysql.com/doc/mysql/en/fulltext-search.html ) from the MySQL Documentation. I hope it helps! --bemansell ... Every correct word in the collection and in the query is weightedaccording to its significance in the collection or query. This way, a word that is present in many documents has a lower weight (and may even have a zero weight), because it has lower semantic value in this particular collection. Conversely, if the word is rare, it receives a higher weight. The weights of the words are then combined to compute the relevance of the row. Such a technique works best with large collections (in fact, it was carefully tuned this way). For very small tables, word distribution does not adequately reflect their semantic value, and this model may sometimes produce bizarre results. For example, although the word ``MySQL'' is present in every row of the articles table, a search for the word produces no results: mysql SELECT * FROM articles - WHERE MATCH (title,body) AGAINST ('MySQL'); Empty set (0.00 sec) The search result is empty because the word ``MySQL'' is present in at least 50% of the rows. As such, it is effectively treated as a stopword. For large datasets, this is the most desirable behavior---a natural language query should not return every second row from a 1GB table. For small datasets, it may be less desirable. A word that matches half of rows in a table is less likely to locate relevant documents. In fact, it most likely finds plenty of irrelevant documents. We all know this happens far too often when we are trying to find something on the Internet with a search engine. It is with this reasoning that rows containing the word are assigned a low semantic value for *the particular dataset in which they occur*. A given word may exceed the 50% threshold in one dataset but not another. The 50% threshold has a significant implication when you first tryfull-text searching to see how it works: If you create a table and insert only one or two rows of text into it, every word in the text occurs in at least 50% of the rows. As a result, no search returns any results. Be sure to insert at least three rows, and preferably many more. On 5/25/05, Scott Purcell [EMAIL PROTECTED] wrote: Hello, I am running 4.0.15 for Win95/98 and am working through the docs. I created a text type field with a 'fulltext' index. As I am experimenting, I have run into a couple of questions: First off, I was having trouble getting results. So I added the word foobar to one of the descriptions: and that worked with this query: select * from item where match(name, description) against('foobar') I have a word 'red' that appears 5-10 times, in a tmp table of 60 records. If I run that query with 'red' select * from item where match(name, description) against('red'); it returns empty set Upon reading, it looks like it is really trying to only get unique names from the index. But in my case the 'red' is a description that I would like to get back. Anyway to force this to return results? Any info would be helpful. I have read, but it gets a little confusing first time through. Thanks, Scott The other thing to remember is the minimum word length. By default it is set to 4. RED has only 3 characters so it would not have been indexed. That would explain why FT
Re: The mysql.server script , simple question
Hello. Changing the basedir variable doesn't automatically changes the datadir variable. This can produce the problems. I've reported a bug: http://bugs.mysql.com/bug.php?id=7873 You can use my suggested patch or specify the options in the option file. See: http://dev.mysql.com/doc/mysql/en/Automatic_start.html Chris [EMAIL PROTECTED] wrote: I've got a question the mysql.server script (came with 4.0.12 and 4.1.8 at with the Linux binary distribution) . My shell scripting knowledge is not even good enough to be called 'limited', but here goes: I'm trying to use mysql.server (Redhat 9) to start MySQL in a non-standard location. On line 47: datadir=/usr/local/mysql/data Should that line be datadir=$basedir/data ? I tried changing basedir to my new path, but it didn't quite work until I changed that line. I'm mostly asking because it *seems* right, but I'm essentially clueless and wanted to double check. Thanks, Chris -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
The mysql.server script , simple question
I've got a question the mysql.server script (came with 4.0.12 and 4.1.8 at with the Linux binary distribution) . My shell scripting knowledge is not even good enough to be called 'limited', but here goes: I'm trying to use mysql.server (Redhat 9) to start MySQL in a non-standard location. On line 47: datadir=/usr/local/mysql/data Should that line be datadir=$basedir/data ? I tried changing basedir to my new path, but it didn't quite work until I changed that line. I'm mostly asking because it *seems* right, but I'm essentially clueless and wanted to double check. Thanks, Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: InnoDB Newbie Simple Question
Carlos Sunden [EMAIL PROTECTED] wrote: InnoDB is included in binary distributions by default as of MySQL 4.0. Hello Is InnoDb always used when installing MySQL whether RPM or binary is used? Yes. If you don't need InnoDB, start MySQL server with --skip-innodb option. I am not completely sure what this is although I've read about it. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
InnoDB Newbie Simple Question
InnoDB is included in binary distributions by default as of MySQL 4.0. Hello Is InnoDb always used when installing MySQL whether RPM or binary is used? I am not completely sure what this is although I've read about it. Thanks! Carlos - Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard.
Re: InnoDB Newbie Simple Question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday 15 June 2004 10:43 am, Carlos Sunden wrote: I am not completely sure what this is although I've read about it. www.innodb.com.. Gives you all the info you can handle. Jeff - -- Not quite human any longer. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAzxqwld4MRA3gEwYRAtTfAKCzwZHN+0D/lr6xk5yW07d1iQYQQgCcCveZ le5ogNSJiNkCEbeEt43te9c= =7Qpw -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
simple question on WHERE SELECT query
There is a particular form of SQL query you can use I believe when you are adding data to a table and want to include an ID number from another lookup table but you only know the name reference and not the ID eg it might be an author table with an author_id and author_name and you want to enter a row into a book table which uses author_id but you only know the name. I think the statement involves a WHERE followed by a SELECT but am unsure of the precise syntax. Regards Adrian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: simple question on WHERE SELECT query
Adrian, You may try this: INSERT INTO tbl_temp2 (fld_id) SELECT tbl_temp1.fld_order_id FROM tbl_temp1 WHERE tbl_temp1.fld_order_id 100; Best Regards, Jonathan Chiu OOCL Logistics Unit 1, 4/F., Sun Hung Kai Centre, 30 Harbour Road, Wanchai TEL: 852 . 2990 0174 FAX: 852 . 28249017 -Original Message- From: adrian Greeman [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 1:12 AM To: [EMAIL PROTECTED] Subject: simple question on WHERE SELECT query There is a particular form of SQL query you can use I believe when you are adding data to a table and want to include an ID number from another lookup table but you only know the name reference and not the ID eg it might be an author table with an author_id and author_name and you want to enter a row into a book table which uses author_id but you only know the name. I think the statement involves a WHERE followed by a SELECT but am unsure of the precise syntax. Regards Adrian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] IMPORTANT NOTICE Email from OOCL is confidential and may be legally privileged. If it is not intended for you, please delete it immediately unread. The internet cannot guarantee that this communication is free of viruses, interception or interference and anyone who communicates with us by email is taken to accept the risks in so doing. Without limitation, OOCL and its affiliates accept no liability whatsoever and howsoever arising in connection with the use of this email. Under no circumstances shall this email constitute a binding agreement to carry or for provision of carriage services by OOCL, which is subject to the availability of carrier's equipment and vessels and the terms and conditions of OOCL's standard bill of lading which is also available at http://www.oocl.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: simple question on WHERE SELECT query
adrian Greeman [EMAIL PROTECTED] wrote: There is a particular form of SQL query you can use I believe when you are adding data to a table and want to include an ID number from another lookup table but you only know the name reference and not the ID eg it might be an author table with an author_id and author_name and you want to enter a row into a book table which uses author_id but you only know the name. I think the statement involves a WHERE followed by a SELECT but am unsure of the precise syntax. Seems you need INSERT .. SELECT: INSERT INTO book( .. ) SELECT author_id .. FROM author WHERE author_name=name; -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Just simple question...
Hi, Am Freitag, 6. Februar 2004 16:03 schrieb Dusan Spisak: Hello everybody! I need to create some simple database. I've started to build it up in Microsoft Access. MS Access was really great for me, it was very easy and user friendly, intuitive. Without any manual I've managed to create a table, to create some views and queries and to prepare reports from them. But, I don't have MS Access at home. I don't want to use illegal software and I am not keen on buying it. That's why I've looked up MySQL. I thought MySQL could be something similar to Access, and for free, so I downloaded it. But now, I've installed it and I realized, that it's something different. There is need to run some server and i don't understand it. Here is my question: Is it possible to use MySQL in the similar way to Access? Without any servers and administration and clients and controlcenter...? I don't need any network at all, I just would like to create and run some small database for home use. Is it possible in MySQL? And, it seems, there is no user interface in MySQL at all. Am I right? Mysql is the right tool for ya. There exist some nice GUIs for it, i always recommend phpMyAdmin. To make it run u need to install php and a webserver. Sounds more complicated than it is. And if ya do it u will have a complete System (with linux often called LAMP - Linux Apache Mysql Php). These components work together just fine. And using phpMyAdmin will give u the freedom to create tables, fill them, work with them and all that stuff just using ur mouse without knowing anything about the actual sql-syntax. Give it a try, u will love a apache-mysql-php system once u installed it succesfully :) Bernd -- [Zufallssig 2] Microsoft isn't the answer. Microsoft is the question, and the answer is no. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Just simple question...
You can install MYSQL on your Windows machine and use this user interface for managing the database http://www.mysql.com/downloads/mysqlcc.html From: Dusan Spisak [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Just simple question... Date: Fri, 06 Feb 2004 16:03:23 +0100 Hello everybody! I need to create some simple database. I've started to build it up in Microsoft Access. MS Access was really great for me, it was very easy and user friendly, intuitive. Without any manual I've managed to create a table, to create some views and queries and to prepare reports from them. But, I don't have MS Access at home. I don't want to use illegal software and I am not keen on buying it. That's why I've looked up MySQL. I thought MySQL could be something similar to Access, and for free, so I downloaded it. But now, I've installed it and I realized, that it's something different. There is need to run some server and i don't understand it. Here is my question: Is it possible to use MySQL in the similar way to Access? Without any servers and administration and clients and controlcenter...? I don't need any network at all, I just would like to create and run some small database for home use. Is it possible in MySQL? And, it seems, there is no user interface in MySQL at all. Am I right? Dusan - Tato sprava neobsahuje virusy. This message is virus-free. Automatic GroupWise signature added by GWAVA. - gwavasig -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Plan your next US getaway to one of the super destinations here. http://special.msn.com/local/hotdestinations.armx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Just simple question...
Hello everybody! I need to create some simple database. I've started to build it up in Microsoft Access. MS Access was really great for me, it was very easy and user friendly, intuitive. Without any manual I've managed to create a table, to create some views and queries and to prepare reports from them. But, I don't have MS Access at home. I don't want to use illegal software and I am not keen on buying it. That's why I've looked up MySQL. I thought MySQL could be something similar to Access, and for free, so I downloaded it. But now, I've installed it and I realized, that it's something different. There is need to run some server and i don't understand it. Here is my question: Is it possible to use MySQL in the similar way to Access? Without any servers and administration and clients and controlcenter...? I don't need any network at all, I just would like to create and run some small database for home use. Is it possible in MySQL? And, it seems, there is no user interface in MySQL at all. Am I right? Dusan - Tato sprava neobsahuje virusy. This message is virus-free. Automatic GroupWise signature added by GWAVA. - gwavasig -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Just simple question...
Yes , you are correct. There is no GUI with mySQL. You can down load one off the web. look on www.mysql.com. I think they have a free one there. I use SQLyog, but you must pay for that. I would advise the move to mySQL from access. I did it a month ago and have never looked back. There is a bit of a learning curve to start with, but if you are in I.T. professionally it's a good thing to have in your toolbox. From: Dusan Spisak [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Just simple question... Date: Fri, 06 Feb 2004 16:03:23 +0100 Hello everybody! I need to create some simple database. I've started to build it up in Microsoft Access. MS Access was really great for me, it was very easy and user friendly, intuitive. Without any manual I've managed to create a table, to create some views and queries and to prepare reports from them. But, I don't have MS Access at home. I don't want to use illegal software and I am not keen on buying it. That's why I've looked up MySQL. I thought MySQL could be something similar to Access, and for free, so I downloaded it. But now, I've installed it and I realized, that it's something different. There is need to run some server and i don't understand it. Here is my question: Is it possible to use MySQL in the similar way to Access? Without any servers and administration and clients and controlcenter...? I don't need any network at all, I just would like to create and run some small database for home use. Is it possible in MySQL? And, it seems, there is no user interface in MySQL at all. Am I right? Dusan - Tato sprava neobsahuje virusy. This message is virus-free. Automatic GroupWise signature added by GWAVA. - gwavasig -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Just simple question...
From: Dusan Spisak [mailto:[EMAIL PROTECTED] Here is my question: Is it possible to use MySQL in the similar way to Access? Without any servers and administration and clients and controlcenter...? I don't need any network at all, I just would like to create and run some small database for home use. Is it possible in MySQL? And, it seems, there is no user interface in MySQL at all. Am I right? MySQL is a database server. However, Access is, too. It's just masked by Microsoft and bundled into a nice GUI (graphical user interface, if you're not familiar with the term) package. It's perfectly acceptable to install the MySQL server locally and only use it locally. It doesn't need to be accessible from the outside. There's a companion client for the server, but it's pretty bare-bones command-line stuff. If you're looking for any sort of GUI, you'll need a webserver installed locally as well. Any GUI I've seen for MySQL runs as a web application, usually written in PHP. As someone said before, I can highly recommend taking on the learning curve for MySQL. It's actually much easier than it may seem -- one of those easy to learn, a lifetime to master things. However, if you're turned off by having to either work on the command-line console or run a local webserver to use a GUI, I can't say that MySQL is necessarily what you're looking for. Good luck in your decision, though. -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Just simple question...
Hello Dusan: MS Access is actually a user front end and not a database engine at all. Many people don't understand this. A front end talks to a database engine, known as a data source in the lingo. MS Access defaults to using one of Microsoft's databases, I believe it is called jet or something like that. MySQL is a better database engine. You can set up Microsoft Access to talk to mySQL. I have done it a couple of times. Here is the recipe how I did it http://www.washington.edu/computing/web/publishing/mysql-access.html It has also been discussed on this list because I was part of the conversation. But if you want to use mySQL you have to either run a database server or some hosting services will give you a database on theirs free and you can connect to it remotely. Once you get your data source set up you can usually forget about it anyway. The closest free thing to a generic front end to mysql is mysqladmin, written in php. It doesnt have the polish of MS access though. Dusan Spisak wrote: Hello everybody! I need to create some simple database. I've started to build it up in Microsoft Access. MS Access was really great for me, it was very easy and user friendly, intuitive. Without any manual I've managed to create a table, to create some views and queries and to prepare reports from them. But, I don't have MS Access at home. I don't want to use illegal software and I am not keen on buying it. That's why I've looked up MySQL. I thought MySQL could be something similar to Access, and for free, so I downloaded it. But now, I've installed it and I realized, that it's something different. There is need to run some server and i don't understand it. Here is my question: Is it possible to use MySQL in the similar way to Access? Without any servers and administration and clients and controlcenter...? I don't need any network at all, I just would like to create and run some small database for home use. Is it possible in MySQL? And, it seems, there is no user interface in MySQL at all. Am I right? Dusan - Tato sprava neobsahuje virusy. This message is virus-free. Automatic GroupWise signature added by GWAVA. - gwavasig -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Simple question : Find older CHILD for each PARENT
Hi, I have a simple problem that I don't know how to solve with mysql. I have 2 tables, a parent table and a child table. parent: --- | p_id | name | --- | 1| A | | 2| B | | ... |... | | 112 | C | | 113 | D | --- child: -- | c_id | p_id | name | age | -- | 1|1 | BP | 15 | | 2|56 | AW | 12 | | ... | ... | GH | 19 | |299|2 | RT | 14 | |300|56 | FG | 18 | -- I want to get a list of all the parents with the age and the name of the older child they've got. Let's say that a parent can't have 2 children with the same age. I can solve my problem by using multiple queries but that's not very clean and a bit heavy (especially if there are lots of parents). Any idea? Thank you Benjamin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Simple question : Find older CHILD for each PARENT
Benjamin PERNOT wrote: I want to get a list of all the parents with the age and the name of the older child they've got. Let's say that a parent can't have 2 children with the same age. I can solve my problem by using multiple queries but that's not very clean and a bit heavy (especially if there are lots of parents). This is a perfect example of a max-concat query. Look up max concat on the mysql website, and it should show you a similar problem with solution. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Simple question about updating a table field
I have a numeric table field, named CREDIT. How can I add a number (+50) to that field for all the table record ? is this correct? UPDATE ThisTable SET CREDIT=CREDIT+50 Please help, Thanks __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Simple question about updating a table field
Yes it is correct, but please don't hijack someone else's thread. Admin-Stress wrote: I have a numeric table field, named CREDIT. How can I add a number (+50) to that field for all the table record ? is this correct UPDATE ThisTable SET CREDIT=CREDIT+50 Please help, Thanks __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Simple Question: MySQL and Shell Scripts
Zach wrote: I am writing a shell script using Born Shell. I am trying to get the result of a SQL statement into a variable. For example: /usr/bin/mysql -uroot -prootpass BOB EOF SELECT * FROM Bobstable WHERE Name=1 EOF How do I get the result into a variable? Thanks in advance! May be: myvar=`/usr/bin/mysql -uroot -prootpass -e 'SELECT * FROM Bobstable WHERE Name=1;' BOB` But this is more a shell than a mysql question, isn't it ? Joseph Bueno -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Simple Question: MySQL and Shell Scripts
On Mon, Jun 23, 2003 at 06:37:17PM -0500, Zach wrote: I am writing a shell script using Born Shell. I am trying to get the result of a SQL statement into a variable. You mean Bourne shell. For example: /usr/bin/mysql -uroot -prootpass BOB EOF SELECT * FROM Bobstable WHERE Name=1 EOF How do I get the result into a variable? If you plan to add LIMIT 1 to your query, consider putting the command line into backquotes. Otherwise, use something like: 8 cut here 8 #!/bin/sh mydb=BOB myuser=user mypass=p4s$w0rd #mysql=/usr/local/bin/mysql mysql=/usr/bin/mysql q=SELECT this,that FROM Bobstable WHERE Name=1 $mysql -u$myuser -p$mypass -e$q $mydb | while read this that; do echo this is $this, that is $that done 8 cut here 8 -- Paul Chvostek [EMAIL PROTECTED] Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Simple Question: MySQL and Shell Scripts
Joseph Bueno wrote: Zach wrote: I am writing a shell script using Born Shell. I am trying to get the result of a SQL statement into a variable. For example: /usr/bin/mysql -uroot -prootpass BOB EOF SELECT * FROM Bobstable WHERE Name=1 EOF How do I get the result into a variable? But this is more a shell than a mysql question, isn't it ? Nah, in fairness, it's more of a MySQL question because the issue is how you execute the 'mysql' command in such a way that it's conducive to the shell environment. I vote 60/40 MySQL vs. Shell. May be: myvar=`/usr/bin/mysql -uroot -prootpass -e 'SELECT * FROM Bobstable WHERE Name=1;' BOB` Don't forget to use '-B' in order to make the output silent except for the results: myvar=`/usr/bin/mysql -u root --password=password -B -e SELECT ...` Naturally I'd be out of place not to mention the security implications: You should 1. not be querying your DB as the root database user if possible, and 2. you should stick your password (which shouldn't match your UNIX password) in a textfile readable only by you so that you don't pass the password on the command line. -Fred -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Simple Question: MySQL and Shell Scripts
On 24-Jun-2003 Fred Whipple wrote: snip Don't forget to use '-B' in order to make the output silent except for the results: and -N to suppress column names. snipagain 2. you should stick your password (which shouldn't match your UNIX password) in a textfile readable only by you so that you don't pass the password on the command line. ~/.my.cnf Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Simple Question: MySQL and Shell Scripts
I am writing a shell script using Born Shell. I am trying to get the result of a SQL statement into a variable. For example: /usr/bin/mysql -uroot -prootpass BOB EOF SELECT * FROM Bobstable WHERE Name=1 EOF How do I get the result into a variable? Thanks in advance!
simple question about 3 files become one table
I have three files which are .frm, .MYD and .MYI. How I can use those three files become one table again? Thanks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: simple question about 3 files become one table
At 16:58 -0400 6/6/03, Vivian Wang wrote: I have three files which are .frm, .MYD and .MYI. How I can use those three files become one table again? Thanks. They already are one table. You don't need to do anything. MySQL implements each MyISAM table using three files. This is normal. -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
One Simple Question
I know that the file size limit for mySQL tables is limited by the operating system. I want to confirm that this is not a database size limit. Pardon my being a novice, but I just want to be sure. Thanks for the help, Joe __ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: simple question
The actual query is : SELECT * FROM PROFILES WHERE fname=scott ORDER BY lastused; The lastused field is of type date, and I want the returned result set to be ordered by that date. Thanks - Scott Carter -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 5:51 PM To: Carter, Scott; '[EMAIL PROTECTED]' Subject: Re: simple question At 17:19 -0600 11/18/02, Carter, Scott wrote: I want to sort my results by a date that is contained in the database table the query is performed on. The ORDER BY clause does not seem to do the trick. How do you do this? Thanks - Scott Carter With ORDER BY. You'll have to provide more details so that we can see what the problem is with your query. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: simple question
At 9:06 -0600 11/19/02, Carter, Scott wrote: The actual query is : SELECT * FROM PROFILES WHERE fname=scott ORDER BY lastused; The lastused field is of type date, and I want the returned result set to be ordered by that date. Still need more info. What dates are in the records with scott and in what order are they returned? Thanks - Scott Carter -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 5:51 PM To: Carter, Scott; '[EMAIL PROTECTED]' Subject: Re: simple question At 17:19 -0600 11/18/02, Carter, Scott wrote: I want to sort my results by a date that is contained in the database table the query is performed on. The ORDER BY clause does not seem to do the trick. How do you do this? Thanks - Scott Carter With ORDER BY. You'll have to provide more details so that we can see what the problem is with your query. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: simple question
There might be ten different records with a fname of scott and the dates might be 2002-11-18, and 2002-11-10 and 2002-10-15. When the query results are returned the ORDER BY clause seems to have no effect on the results. I would want the record with the most current date to be returned first, then second most current date ... The question is really pretty simple, I just need to know how in MySQL can I order my query results in chronilogical order based on a column of date type. This is an application where I write the date a user signs on into the database, and when the users are queryed I need to show the newest user first. Thanks - Scott Carter -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 9:46 AM To: Carter, Scott; '[EMAIL PROTECTED]' Subject: RE: simple question At 9:06 -0600 11/19/02, Carter, Scott wrote: The actual query is : SELECT * FROM PROFILES WHERE fname=scott ORDER BY lastused; The lastused field is of type date, and I want the returned result set to be ordered by that date. Still need more info. What dates are in the records with scott and in what order are they returned? Thanks - Scott Carter -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 5:51 PM To: Carter, Scott; '[EMAIL PROTECTED]' Subject: Re: simple question At 17:19 -0600 11/18/02, Carter, Scott wrote: I want to sort my results by a date that is contained in the database table the query is performed on. The ORDER BY clause does not seem to do the trick. How do you do this? Thanks - Scott Carter With ORDER BY. You'll have to provide more details so that we can see what the problem is with your query. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: simple question
At 11:37 -0600 11/19/02, Carter, Scott wrote: There might be ten different records with a fname of scott and the dates might be 2002-11-18, and 2002-11-10 and 2002-10-15. When the query results are returned the ORDER BY clause seems to have no effect on the results. I would want the record with the most current date to be returned first, then second most current date ... You're describing your results, not showing them. That's not helpful. If you're saying that ORDER BY has *no* effect, then do these two queries produce identical results? SELECT fname, lastused FROM PROFILES where fname=scott ORDER BY lastused; SELECT fname, lastused FROM PROFILES where fname=scott; Let's see the output from these queries. The question is really pretty simple, Yes, it is. And the answer is that you should use ORDER BY. But you're not providing the information necessary to determine whether it's working correctly, or whether it's just not working the way you expect -- which may well be a completely different thing. In fact, from your description in the first paragraph, it sounds like you want ORDER BY lastused DESC and not just ORDER BY lastused. That will sort with the greatest (most recent) date first. Without DESC, the least (least recent) date will appear first. I just need to know how in MySQL can I order my query results in chronilogical order based on a column of date type. This is an application where I write the date a user signs on into the database, and when the users are queryed I need to show the newest user first. Thanks - Scott Carter - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: simple question
The problem is the command is not ordering in either direction. The ORDER BY clause does not seem to have any effect at all. Maybe ORDER BY is not the right solution. If I want to return records sorted by a column of date type, how do I do this? Thanks - Scott Carter -Original Message- From: Doug Durham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 11:59 AM To: Carter, Scott Subject: RE: simple question Since the default ORDER BY is ascending, and you want the most recent first, have you tried ... ORDER BY lastused DESC - Doug At 11:37 AM 11/19/2002 -0600, you wrote: There might be ten different records with a fname of scott and the dates might be 2002-11-18, and 2002-11-10 and 2002-10-15. When the query results are returned the ORDER BY clause seems to have no effect on the results. I would want the record with the most current date to be returned first, then second most current date ... The question is really pretty simple, I just need to know how in MySQL can I order my query results in chronilogical order based on a column of date type. This is an application where I write the date a user signs on into the database, and when the users are queryed I need to show the newest user first. Thanks - Scott Carter -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 9:46 AM To: Carter, Scott; '[EMAIL PROTECTED]' Subject: RE: simple question At 9:06 -0600 11/19/02, Carter, Scott wrote: The actual query is : SELECT * FROM PROFILES WHERE fname=scott ORDER BY lastused; The lastused field is of type date, and I want the returned result set to be ordered by that date. Still need more info. What dates are in the records with scott and in what order are they returned? Thanks - Scott Carter -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 5:51 PM To: Carter, Scott; '[EMAIL PROTECTED]' Subject: Re: simple question At 17:19 -0600 11/18/02, Carter, Scott wrote: I want to sort my results by a date that is contained in the database table the query is performed on. The ORDER BY clause does not seem to do the trick. How do you do this? Thanks - Scott Carter With ORDER BY. You'll have to provide more details so that we can see what the problem is with your query. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: simple question
order by date_format(mydate,'-mm-dd') desc -Original Message- From: Carter, Scott [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 11:30 AM To: 'Doug Durham'; '[EMAIL PROTECTED]' Subject: RE: simple question The problem is the command is not ordering in either direction. The ORDER BY clause does not seem to have any effect at all. Maybe ORDER BY is not the right solution. If I want to return records sorted by a column of date type, how do I do this? Thanks - Scott Carter -Original Message- From: Doug Durham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 11:59 AM To: Carter, Scott Subject: RE: simple question Since the default ORDER BY is ascending, and you want the most recent first, have you tried ... ORDER BY lastused DESC - Doug At 11:37 AM 11/19/2002 -0600, you wrote: There might be ten different records with a fname of scott and the dates might be 2002-11-18, and 2002-11-10 and 2002-10-15. When the query results are returned the ORDER BY clause seems to have no effect on the results. I would want the record with the most current date to be returned first, then second most current date ... The question is really pretty simple, I just need to know how in MySQL can I order my query results in chronilogical order based on a column of date type. This is an application where I write the date a user signs on into the database, and when the users are queryed I need to show the newest user first. Thanks - Scott Carter -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 9:46 AM To: Carter, Scott; '[EMAIL PROTECTED]' Subject: RE: simple question At 9:06 -0600 11/19/02, Carter, Scott wrote: The actual query is : SELECT * FROM PROFILES WHERE fname=scott ORDER BY lastused; The lastused field is of type date, and I want the returned result set to be ordered by that date. Still need more info. What dates are in the records with scott and in what order are they returned? Thanks - Scott Carter -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 5:51 PM To: Carter, Scott; '[EMAIL PROTECTED]' Subject: Re: simple question At 17:19 -0600 11/18/02, Carter, Scott wrote: I want to sort my results by a date that is contained in the database table the query is performed on. The ORDER BY clause does not seem to do the trick. How do you do this? Thanks - Scott Carter With ORDER BY. You'll have to provide more details so that we can see what the problem is with your query. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
simple question
I want to sort my results by a date that is contained in the database table the query is performed on. The ORDER BY clause does not seem to do the trick. How do you do this? Thanks - Scott Carter - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: simple question
At 17:19 -0600 11/18/02, Carter, Scott wrote: I want to sort my results by a date that is contained in the database table the query is performed on. The ORDER BY clause does not seem to do the trick. How do you do this? Thanks - Scott Carter With ORDER BY. You'll have to provide more details so that we can see what the problem is with your query. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Out of memory on simple question.
Hi After running this simple question I get this error. I have looked at the my.cnf file and all looks fine and the system has 1.256 G of memory. Can some one please tell me where I have gone wrong. select in_names.Username from in_names, in_names2 where in_names.Username != in_names2.Username; ./mysql: Out of memory (Needed 8164 bytes) ERROR 2008: MySQL client run out of memory Simon PS Both tables are indexed. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Out of memory on simple question.
Thanks for this... So I think I need some joins! Simon -Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED]] Sent: 24 June 2002 12:19 To: Mysql (E-mail) Cc: Simon Green Subject: Re: Out of memory on simple question. * Simon Green After running this simple question I get this error. I have looked at the my.cnf file and all looks fine and the system has 1.256 G of memory. Can some one please tell me where I have gone wrong. select in_names.Username from in_names, in_names2 where in_names.Username != in_names2.Username; ./mysql: Out of memory (Needed 8164 bytes) ERROR 2008: MySQL client run out of memory If you have many names in these tables, this will consume a lot of memory, yes. You are asking for all combinations of names where the name is not the same. This is an example with only five names in each table: mysql create table in_names (Username varchar(30)); Query OK, 0 rows affected (0.02 sec) mysql insert into in_names values(aaa),(bbb),(ccc),(ddd),(eee); Query OK, 5 rows affected (0.01 sec) Records: 5 Duplicates: 0 Warnings: 0 mysql create table in_names2 select * from in_names; Query OK, 5 rows affected (0.03 sec) Records: 5 Duplicates: 0 Warnings: 0 mysql select in_names.Username,in_names2.Username - from in_names, in_names2 - where in_names.Username != in_names2.Username; +--+--+ | Username | Username | +--+--+ | bbb | aaa | | ccc | aaa | | ddd | aaa | | eee | aaa | | aaa | bbb | | ccc | bbb | | ddd | bbb | | eee | bbb | | aaa | ccc | | bbb | ccc | | ddd | ccc | | eee | ccc | | aaa | ddd | | bbb | ddd | | ccc | ddd | | eee | ddd | | aaa | eee | | bbb | eee | | ccc | eee | | ddd | eee | +--+--+ 20 rows in set (0.00 sec) I selected both names, so that you can see what is going on. Each name in one table is matched with _every_ name in the other table, except the one that is the same... just as you asked for. :) -- Roger - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Out of memory on simple question.
* Simon Green After running this simple question I get this error. I have looked at the my.cnf file and all looks fine and the system has 1.256 G of memory. Can some one please tell me where I have gone wrong. select in_names.Username from in_names, in_names2 where in_names.Username != in_names2.Username; ./mysql: Out of memory (Needed 8164 bytes) ERROR 2008: MySQL client run out of memory If you have many names in these tables, this will consume a lot of memory, yes. You are asking for all combinations of names where the name is not the same. This is an example with only five names in each table: mysql create table in_names (Username varchar(30)); Query OK, 0 rows affected (0.02 sec) mysql insert into in_names values(aaa),(bbb),(ccc),(ddd),(eee); Query OK, 5 rows affected (0.01 sec) Records: 5 Duplicates: 0 Warnings: 0 mysql create table in_names2 select * from in_names; Query OK, 5 rows affected (0.03 sec) Records: 5 Duplicates: 0 Warnings: 0 mysql select in_names.Username,in_names2.Username - from in_names, in_names2 - where in_names.Username != in_names2.Username; +--+--+ | Username | Username | +--+--+ | bbb | aaa | | ccc | aaa | | ddd | aaa | | eee | aaa | | aaa | bbb | | ccc | bbb | | ddd | bbb | | eee | bbb | | aaa | ccc | | bbb | ccc | | ddd | ccc | | eee | ccc | | aaa | ddd | | bbb | ddd | | ccc | ddd | | eee | ddd | | aaa | eee | | bbb | eee | | ccc | eee | | ddd | eee | +--+--+ 20 rows in set (0.00 sec) I selected both names, so that you can see what is going on. Each name in one table is matched with _every_ name in the other table, except the one that is the same... just as you asked for. :) -- Roger - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: RE: Simple Question relating to Indexing
Why do you want to restrict the names to be unique? //Anders - SQL, QUERY -Original Message- From: Shaun Bramley To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED] Sent: 3-5-02 20:16 Subject: Re: Simple Question relating to Indexing I'd like to first thank Carl and Anders for your quick and very informative answers. I really appreciate it. To get this staightened out, for a table specified by: CREATE TABLE Player ( PlayerID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, TeamID INT NOT NULL, TrophyFlag TINYINT, RecordFlag TINYINT, LetterID TINYINT NOT NULL, NameFirst char(15) NOT NULL, NameLast char(20) NOT NULL) My primary key is obviously: playerid. letterID, trophyflag, recordflag, and teamid can be foreign keys. They are not configured so right now. An index could be created based upon NameFirst and NameLast. Which would be ok so long as there are not two people with the name John Smith (or whatever) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Simple Question relating to Indexing
Hello all being relatively new on the SQL scene I must say some of the concepts are a little new and strange to me. My really big question is what is the difference between an index and a key? are the synonamous with each other? Thanks in advance Shaun Bramley query mysql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Simple Question relating to Indexing
I'll take a stab at this. A key is a value that you can use in a table and relate it to another table. In this usage you will hear people talk of primary keys and foreign keys. A primary key is a value that uniquely identifies a record in a table. With VERY FEW exceptions, all tables should have a primary key. I prefer a primary key that does not mean anything (i.e. a sequential number using MySQL's auto increment instead of SSN or phone number) The primary reason against these 'smart keys' is that no matter what you choose, you will eventually have one that is wrong and has to be changed. Then you orphan all the child records in other tables until you update them. It's a real PITA. (BTW, a primary key can have multiple parts if necessary...but again KISS is the best rule) A foreign key is a primary key form another table, stored in a record to relate that record back to the 'parent'. This allows you to store related data in separate tables but retrieve it easily. My favorite example is people an phones. 1 person may have n phone numbers. your choices for modeling this are either keep adding columns to your person table each time you come up with a new phone type or add a phone table and store the phone number and the personID as a FK. Then you can select * from phone where personID=4 to get all of person #4's phones. (NEVER use Select *!) An Index is a mechanism to allow for faster searching through the database. Index can be unique, as in the case of primary keys. This forces the value to be unique and will throw an error if you insert a duplicate value into a field that has a unique index on it. General rule of thumb, every table should have exactly 1 primary key and 1..n indexes. Both of these are generalizations but they should help you. Or not... =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Shaun Bramley [mailto:[EMAIL PROTECTED]] Sent: Friday, May 03, 2002 10:45 AM To: [EMAIL PROTECTED] Subject: Simple Question relating to Indexing Hello all being relatively new on the SQL scene I must say some of the concepts are a little new and strange to me. My really big question is what is the difference between an index and a key? are the synonamous with each other? Thanks in advance Shaun Bramley query mysql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Simple Question relating to Indexing
Hello all being relatively new on the SQL scene I must say some of the concepts are a little new and strange to me. My really big question is what is the difference between an index and a key? are the synonamous with each other? A key will identifying a row or several rows. Just like you key to your house can identified by you house lock. But the key wont tell you were your house is located, this is what the index will do for you. An index is just a smart way to skip some rows that is not needed to search while you look for your data. For example if you have a ordered list of numbers from 1 to hundred, then you know you dont have to look in the upper part of the list if your number is less than 50. So the purpose of the index is to locate where you can find a match for your key, in other words exclude parts which is guaranteed not to include the key. Analogue example of index and none indexed search: None indexed unique search: Assume you live in a skyscraper. You start at the bottom floor and test your house key in every single lock until you find a match, if you don't find a match you progress to the next floor and repeat the procedure. If you find a match you stops seating None indexed none unique search: You start at the bottom floor and test your master key in every single lock until you find a match. If you find a match, you mark that door, and continue search the rest of the doors, until you reached the top floor. Indexed unique search: You go to the elevator, selects the floor which match your key, arriving at this floor you tries out all doors until you find one match. Indexed none unique search: You go to the elevator, with a list of floors you need to visit. You visit each floor specified in the list and on arrival at each of these floors you test all doors at that floor and mark the doors that has a match. Basically an index is specifying a lesser search space for you, so you don't have to brute force search an entire table. A brute force search is normally refereed to as a table scan. While you key is the value that actually precesly can identify your data, it is a slow way to find it since brute force search is needed to locate yuor data if you only uses the key. The index has the ability to very fast narrow down your data, but to the cost of resultion - the index doesn't well on close distance. Hence the index can't identify your data, just tell you an about where location. In a way you can put it like this: The index has good sight at long distance, but bad at short, while the key has bad sight on long distance but good sight on short. //Anders - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Simple Question relating to Indexing
I'd like to first thank Carl and Anders for your quick and very informative answers. I really appreciate it. To get this staightened out, for a table specified by: CREATE TABLE Player ( PlayerID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, TeamID INT NOT NULL, TrophyFlag TINYINT, RecordFlag TINYINT, LetterID TINYINT NOT NULL, NameFirst char(15) NOT NULL, NameLast char(20) NOT NULL) My primary key is obviously: playerid. letterID, trophyflag, recordflag, and teamid can be foreign keys. They are not configured so right now. An index could be created based upon NameFirst and NameLast. Which would be ok so long as there are not two people with the name John Smith (or whatever) - Original Message - From: Svensson, B.A.T. (HKG) [EMAIL PROTECTED] To: Shaun Bramley [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, May 03, 2002 1:11 PM Subject: RE: Simple Question relating to Indexing Hello all being relatively new on the SQL scene I must say some of the concepts are a little new and strange to me. My really big question is what is the difference between an index and a key? are the synonamous with each other? A key will identifying a row or several rows. Just like you key to your house can identified by you house lock. But the key wont tell you were your house is located, this is what the index will do for you. An index is just a smart way to skip some rows that is not needed to search while you look for your data. For example if you have a ordered list of numbers from 1 to hundred, then you know you dont have to look in the upper part of the list if your number is less than 50. So the purpose of the index is to locate where you can find a match for your key, in other words exclude parts which is guaranteed not to include the key. Analogue example of index and none indexed search: None indexed unique search: Assume you live in a skyscraper. You start at the bottom floor and test your house key in every single lock until you find a match, if you don't find a match you progress to the next floor and repeat the procedure. If you find a match you stops seating None indexed none unique search: You start at the bottom floor and test your master key in every single lock until you find a match. If you find a match, you mark that door, and continue search the rest of the doors, until you reached the top floor. Indexed unique search: You go to the elevator, selects the floor which match your key, arriving at this floor you tries out all doors until you find one match. Indexed none unique search: You go to the elevator, with a list of floors you need to visit. You visit each floor specified in the list and on arrival at each of these floors you test all doors at that floor and mark the doors that has a match. Basically an index is specifying a lesser search space for you, so you don't have to brute force search an entire table. A brute force search is normally refereed to as a table scan. While you key is the value that actually precesly can identify your data, it is a slow way to find it since brute force search is needed to locate yuor data if you only uses the key. The index has the ability to very fast narrow down your data, but to the cost of resultion - the index doesn't well on close distance. Hence the index can't identify your data, just tell you an about where location. In a way you can put it like this: The index has good sight at long distance, but bad at short, while the key has bad sight on long distance but good sight on short. //Anders - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Simple Question relating to Indexing
I've not checked your syntax but it looks like you've got the idea. One caveat. Unless you have a UNIQUE index, you can have multiple people named John Smith. If you specify UNIQUE in your index clause then you can't. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Shaun Bramley [mailto:[EMAIL PROTECTED]] Sent: Friday, May 03, 2002 1:17 PM To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED] Subject: Re: Simple Question relating to Indexing I'd like to first thank Carl and Anders for your quick and very informative answers. I really appreciate it. To get this staightened out, for a table specified by: CREATE TABLE Player ( PlayerID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, TeamID INT NOT NULL, TrophyFlag TINYINT, RecordFlag TINYINT, LetterID TINYINT NOT NULL, NameFirst char(15) NOT NULL, NameLast char(20) NOT NULL) My primary key is obviously: playerid. letterID, trophyflag, recordflag, and teamid can be foreign keys. They are not configured so right now. An index could be created based upon NameFirst and NameLast. Which would be ok so long as there are not two people with the name John Smith (or whatever) - Original Message - From: Svensson, B.A.T. (HKG) [EMAIL PROTECTED] To: Shaun Bramley [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, May 03, 2002 1:11 PM Subject: RE: Simple Question relating to Indexing Hello all being relatively new on the SQL scene I must say some of the concepts are a little new and strange to me. My really big question is what is the difference between an index and a key? are the synonamous with each other? A key will identifying a row or several rows. Just like you key to your house can identified by you house lock. But the key wont tell you were your house is located, this is what the index will do for you. An index is just a smart way to skip some rows that is not needed to search while you look for your data. For example if you have a ordered list of numbers from 1 to hundred, then you know you dont have to look in the upper part of the list if your number is less than 50. So the purpose of the index is to locate where you can find a match for your key, in other words exclude parts which is guaranteed not to include the key. Analogue example of index and none indexed search: None indexed unique search: Assume you live in a skyscraper. You start at the bottom floor and test your house key in every single lock until you find a match, if you don't find a match you progress to the next floor and repeat the procedure. If you find a match you stops seating None indexed none unique search: You start at the bottom floor and test your master key in every single lock until you find a match. If you find a match, you mark that door, and continue search the rest of the doors, until you reached the top floor. Indexed unique search: You go to the elevator, selects the floor which match your key, arriving at this floor you tries out all doors until you find one match. Indexed none unique search: You go to the elevator, with a list of floors you need to visit. You visit each floor specified in the list and on arrival at each of these floors you test all doors at that floor and mark the doors that has a match. Basically an index is specifying a lesser search space for you, so you don't have to brute force search an entire table. A brute force search is normally refereed to as a table scan. While you key is the value that actually precesly can identify your data, it is a slow way to find it since brute force search is needed to locate yuor data if you only uses the key. The index has the ability to very fast narrow down your data, but to the cost of resultion - the index doesn't well on close distance. Hence the index can't identify your data, just tell you an about where location. In a way you can put it like this: The index has good sight at long distance, but bad at short, while the key has bad sight on long distance but good sight on short. //Anders - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: simple question on joining tables
Yaniv, Set the field of user_id to INT then make the size 10 or larger, which will produce an ID size of up to 99. Now set it to auto increment then set the user_id field to Primary key, this should solve your problem, if I understand you correctly -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:02 AM To: [EMAIL PROTECTED] Subject: simple question on joining tables Hi everyone, I am starting my first mySQL project . I want to create 2 tables Table User : userId , FisrtName, LastNAme, Gender with userId defined as the primary key that auto-increments I want that each time I insert a new row in this table, the field userId is inserted as well in another table named Results Table Results : userId, Category, ResponseText, I read carefully the mySQL tutorial and tried to define userId field when creating Table Resultsas follows : userId smallint not null referenced user . I tried to use then the function last_insert_id to insert new rows in Table Results but it didn't work . I always get 0 in the userId field of TableResult. Thank you very much in advance for your help ! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
simple question on joining tables
Hi everyone, I am starting my first mySQL project . I want to create 2 tables Table User : userId , FisrtName, LastNAme, Gender with userId defined as the primary key that auto-increments I want that each time I insert a new row in this table, the field userId is inserted as well in another table named Results Table Results : userId, Category, ResponseText, I read carefully the mySQL tutorial and tried to define userId field when creating Table Resultsas follows : userId smallint not null referenced user . I tried to use then the function last_insert_id to insert new rows in Table Results but it didn't work . I always get 0 in the userId field of TableResult. Thank you very much in advance for your help ! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
simple question?
hey all, using mysql ver 3.23.36 got stuck with something, here's a simplified example of it: +---+---+ | a | b | +---+---+ | 1 | 1 | | 1 | 2 | | 2 | 2 | | 3 | 1 | +---+---+ I would like to retrieve the set of all a where b !=2 so in the above example, only 3 would be returned... but a simple query like select a from table where unfortunately unless I use subselect I have no clue how to do this... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: simple question?
* Michael Ayres +---+---+ | a | b | +---+---+ | 1 | 1 | | 1 | 2 | | 2 | 2 | | 3 | 1 | +---+---+ I would like to retrieve the set of all a where b !=2 so in the above example, only 3 would be returned... Use a LEFT JOIN: SELECT t1.* FROM t1 LEFT JOIN t1 AS t2 ON t2.a=t1.a AND t2.b=2 WHERE ISNULL(t2.a); -- Roger database, 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
Somewhat simple question on tables.
Hello, I have a relatively simple question to ask. Any help is great appreciated. Let us say that I want to create a classic table that would have columns for a persons name, eye color, age, etc. However, I also want to store a list (somewhere) of that particular persons favorite foods (which can grow to be several hundred entries). I realize that there could be many ways of doing this, but what is the 'most effective' method? I have the DuBois mySQL book if anyone could cite any references. Thank you, Jim P.S. you're all doing great job with the development of mySQL. I tip my hat. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Somewhat simple question on tables.
James -- You haven't done enough book work this is basic db design stuff, covered in Dubois book and evey other, the short answer is: Primary Key - foriegn Keys i.e People table: person_id, # Primary key, unique and auto increment fname lname ... Food person_id # pulled from People table via select statement # Index Not unique, NOT auto inecremented food_index # Primary key, unique and auto increment More important, How do you want to search this tables. i.e. first, last, food ..etc think indexing. Final thought, do you want to pull food names from anothe table? David Hello, I have a relatively simple question to ask. Any help is great appreciated. Let us say that I want to create a classic table that would have columns for a persons name, eye color, age, etc. However, I also want to store a list (somewhere) of that particular persons favorite foods (which can grow to be several hundred entries). I realize that there could be many ways of doing this, but what is the 'most effective' method? I have the DuBois mySQL book if anyone could cite any references. Thank you, Jim P.S. you're all doing great job with the development of mySQL. I tip my hat. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
deceptively simple question
I know that when it comes to deleting users from the user table, I could revoke all privileges and use an SQL 'delete from' command, but I wonder if there's an easier script/method for dropping a user? I've been combing the manual for a couple days and while I can create users and grant/revoke privileges, simply deleting them has eluded me. -- ***+*** *** [] *** *** Peter H. Burris, [] [EMAIL PROTECTED] *** *** Unix System Admin [] phone: 301.614.5110 *** *** CODE 922, Bldg 33 [] pager: 301.647.2752 *** *** [] *** ***+*** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: deceptively simple question
At 2:17 PM -0400 6/1/01, Peter H. Burris wrote: I know that when it comes to deleting users from the user table, I could revoke all privileges and use an SQL 'delete from' command, but I wonder if there's an easier script/method for dropping a user? I've been combing the manual for a couple days and while I can create users and grant/revoke privileges, simply deleting them has eluded me. That's indeed how you do it. REVOKE doesn't remove the account record from the user table, so you must DELETE it explicitly to remove not just the account's privileges, but the account itself as well. -- ***+*** ***[] *** *** Peter H. Burris, [] [EMAIL PROTECTED] *** *** Unix System Admin [] phone: 301.614.5110 *** *** CODE 922, Bldg 33 [] pager: 301.647.2752 *** ***[] *** ***+*** -- Paul DuBois, [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
Simple question
I've installed Mysql server version 3.23.36 from source distribution (*.tar.gz). When I show the php4 credits (?phpinfo(); ?) in my browser it shows: MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 3.23.22-beta Why it display other version of client api than I install. It would be nice that You answer me. Adrian Grygier - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Simple question
Why it display other version of client api than I install. It would be nice that You answer me. Did you compile PHP with --with-mysql=/path/to/mysql Bye, B. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Simple question
Hi Did you leave an old version of the shared libs lying around? At 10:16 17/04/2001 +0200, Administrator wrote: I've installed Mysql server version 3.23.36 from source distribution (*.tar.gz). When I show the php4 credits (?phpinfo(); ?) in my browser it shows: MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 3.23.22-beta Why it display other version of client api than I install. It would be nice that You answer me. Adrian Grygier - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php Regards John -- MySQL Development Team __ ___ __ __ / |/ /_ __/ __/ __ \/ / John Dean [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\/ Mansfield, England, 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
Re: Simple question
At 19:31 17-4-01 +0100, John Dean wrote: Hi Did you leave an old version of the shared libs lying around? The old version is packed with PHP.. Bye, B. query sql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Simple question
On my linux distribution of Suse 7.0 kmysql was installed as part of the kde window manager. If you do a web search for kymsql you can find it there also. Joel Holtzman wrote: Thanks. WHere do I find this? Are the instructions in english? It's frustrating getting spanish/german sites since I can't understand what to do. It would be nice to be able to work via gui. But will I get permission errors if I don't use 'grant'? I have other gui's that give the same error. I download them to my windows 98 pc, and when I connect to the server, it won't let me in. Do you think I should do that first? Thanks for your time Joel - Original Message - From: kentj [EMAIL PROTECTED] To: Joel Holtzman [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 05, 2001 3:24 PM Subject: Re: Simple question A gui that works on the linux box is kmysql. Joel Holtzman wrote: Hello, I always wanted a gui interface to use on my win 98 pc to connect to mysql, and create/edit tables. However, i always get an access denied error, saying I'm not allowed to connect to the mysql server. However, via telnet, I am fine. The support for the software sucks, and all the other programs I have tried suck, don't work, or are in german. What gui interface is good to connect to a mysql server to create/edit db's/tables, and if you use it, how in the world do you connect? I can connect to the server via telnet. Just fine. But via the software, I get permission denied. Any way I can set it up on my server to allow such a connection out of telnet? Thanks Joel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Simple question
Hello, I always wanted a gui interface to use on my win 98 pc to connect to mysql, and create/edit tables. However, i always get an access denied error, saying I'm not allowed to connect to the mysql server. However, via telnet, I am fine. The support for the software sucks, and all the other programs I have tried suck, don't work, or are in german. What gui interface is good to connect to a mysql server to create/edit db's/tables, and if you use it, how in the world do you connect? I can connect to the server via telnet. Just fine. But via the software, I get permission denied. Any way I can set it up on my server to allow such a connection out of telnet? Thanks Joel
Re: Simple question
Joel Holtzman wrote: Hello, I always wanted a gui interface to use on my win 98 pc to connect to mysql, and create/edit tables. However, i always get an access denied error, saying I'm not allowed to connect to the mysql server. However, via telnet, I am fine. By default MySQL server allows only connections from localhost. This is prorably what you do: use telnet to login into unix box and then use mysql command line client there. If you try to connect from some other computer you of course SHOULD get access denied error. This is security. To allow this other computer to connect read the manual and especially about command "GRANT". -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Tonu Samuel [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Tallinn, Estonia ___/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 simple question
Nick Gianakas wrote: Hi all, I just started learning mySQL yesterday. I'm using it for a web application (simple CGI stuff). To begin, I wrote a simple program that just initializes a mySQL connection and then closes it. Here's my problem: I'm getting compile errors when I link the libmysqlclient.a archive to my program. The compiler reports these errors: Undefined symbol first referenced in file socket ../mySQL/lib/libmysqlclient.a(libmysql.o) gethostbyname../mySQL/lib/libmysqlclient.a(libmysql.o) setsockopt ../mySQL/lib/libmysqlclient.a(libmysql.o) getservbyname../mySQL/lib/libmysqlclient.a(libmysql.o) floor../mySQL/lib/libmysqlclient.a(password.o) getsockopt ../mySQL/lib/libmysqlclient.a(libmysql.o) inet_addr../mySQL/lib/libmysqlclient.a(libmysql.o) shutdown ../mySQL/lib/libmysqlclient.a(libmysql.o) connect ../mySQL/lib/libmysqlclient.a(libmysql.o) I'm compiling using gcc as such: gcc test.c -o test.cgi ../mySQL/lib/libmysqlclient.a If I remove the archive, it complains about missing definitions for the two functions I use: init close. All the complaints seem like simple functions or types that are defined in the system. ie. floor is defined in math.h I assume there are references to these functions or types in the archive that cannot be resolved (lack of header file). If this is the case, where do I include the appropriate header files? It seems I shouldn't have to do this in my source. I'm compiling on a Solaris 7 machine w/ dual Compaq Alphas. I'll be glad when someone points out my ignorance. Puzzled, -Nick G. Hi, you need to add -lsocket -lnsl -lm to your libs thats where these functions are... lars - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php