Re: Innodb tables lose foreign keys after creating an index...
Rick, sorry, it is not mentioned in the manual that MySQL performs a CREATE INDEX by doing an ALTER TABLE. And ALTER TABLE has the feature (= documented bug) that it removes foreign key definitions. You should define all your indexes within the table create statement, like in: CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; CREATE TABLE child(id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id)) TYPE=INNODB; Best regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB -Original Message- From: Rick Flower [EMAIL PROTECTED] To: MySQL Mailing List [EMAIL PROTECTED] Cc: Heikki Tuuri [EMAIL PROTECTED] Date: Friday, March 01, 2002 2:32 AM Subject: Innodb tables lose foreign keys after creating an index... Hi all.. Are any of you aware of a way to get indexes to work at all with Innodb tables containing foreign keys? I'm finding that after doing a create index on a table which *had* foreign keys, after the create, the foreign keys are gone.. I've included a simple test below which shows off the problem quite well.. I've searched around on Google to see if anyone had run into this problem, but didn't find any reference.. This really makes foreign keys worthless in MySQL.. The more I dig into MySQL, the less I like it due to missing features or wierd side effects of existing ones.. Perhaps someone can shed some light on what I may be doing wrong.. By the way, I'm using MySQL 3.23.47 on a Solaris box -- if it matters.. To reproduce the problem: 1) create table test_fk_parent(id int not null, primary key (id)) type=innodb; 2) create table test_fk_child ( id int not null unique, parent_id int, index par_ind(parent_id), foreign key(parent_id) references test_fk_parent(id)) type=innodb; 3) create index CHILD_KEY on test_fk_child (id); Below is the sample output : mysql create table test_fk_parent(id int not null, primary key (id)) type=innodb; Query OK, 0 rows affected (0.04 sec) mysql create table test_fk_child ( id int not null unique, parent_id int, index par_ind(parent_id), foreign key(parent_id) references test_fk_parent(id)) type=innodb; Query OK, 0 rows affected (0.05 sec) mysql show table status; ++++--++--- --+-+--+---++-- ---+-+++--- --+ | Name | Type | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Create_options | Comment | ++++--++--- --+-+--+---++-- ---+-+++--- --+ | test_fk_child | InnoDB | Fixed |0 | 0 | 16384 |NULL |32768 | 0 | NULL | NULL | NULL| NULL || InnoDB free: 5807104 kB; (parent_id) REFER vista/test_fk_parent(id) | | test_fk_parent | InnoDB | Fixed |0 | 0 | 16384 |NULL |0 | 0 | NULL | NULL | NULL| NULL || InnoDB free: 5807104 kB | ++++--++--- --+-+--+---++-- ---+-+++--- --+ 2 rows in set (0.01 sec) [[[ NOTICE THE EXISTING FOREIGN KEY ABOVE ]]] mysql create index CHILD_KEY on test_fk_child (id); Query OK, 0 rows affected (0.21 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql show table status; ++++--++--- --+-+--+---++-- ---+-+++-+ | Name | Type | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Create_options | Comment | ++++--++--- --+-+--+---++-- ---+-+++-+ | test_fk_child | InnoDB | Fixed |0 | 0 | 16384 |NULL |49152 | 0 | NULL | NULL | NULL| NULL || InnoDB free: 5807104 kB | | test_fk_parent | InnoDB | Fixed |
about installing mysql on windows 98
dear sir, please help me out to install the mysql windows version.the problem is i have only windows 98 as stand alone.i donot have windows NT SERVER. so can mysql be installed on windows 98 as stand alone without the help of a server.please mail back. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: odbc...
Is it possible to have global access to all databases using the new odbc driver? For example I have an app that uses more than one table owner. In Mysql, I had to set up a db for each owner but when I try to connect through the odbc, I don't have access to all the databases, just one. How can I get access to them all? As far as I know Delphi provides such issue that can connect to DB selected in Object Pascal not in ODBC driver. ODBC describes the the name and port of server only. Marek Wysmulek. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Lookup tables and indexing
Jeff, Friday, March 01, 2002, 12:05:36 AM, you wrote: JK Thanks for the reply. Does it actually hurt to index them on lower volumes JK of traffic? Or is it neglible? Just try and you'll see, it really depends on your context. JK --jeff Jeff, Thursday, February 28, 2002, 7:14:51 AM, you wrote: JK Is there a rule of thumb for small tables and whether they should be JK indexed? I have several small, two column lookup tables with few rows JK (100-300) and some very small tables ( 10 rows). I don't plan on JK indexing JK the very small ones, but what about the others? It depends on your request traffic. If it is high (say, thousands per second) - it would be worthy to index them. JK --jeff -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: about installing mysql on windows 98
Yeah no problem. I believe you will need to run the following: mysqld-nt --standalone HTH Neil Rajesh Chabria wrote: dear sir, please help me out to install the mysql windows version.the problem is i have only windows 98 as stand alone.i donot have windows NT SERVER. so can mysql be installed on windows 98 as stand alone without the help of a server.please mail back. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php *** This message was virus checked with: SAVI 3.54 Feb 2002 last updated 26th February 2002 *** -- Email: [EMAIL PROTECTED] [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Can somebody help me with round (columna,columnb) ?
* Doug Thompson On Thu, 28 Feb 2002 22:38:04 -, DL Neil wrote: I know it's getting late, so perhaps I'm not following you sufficiently closely. What does inherited mean? Inherited referred to using the float(10,4) formatting of the numbers field in this case. It seems the highest number of decimals used in the X expression of the round(X,D) is used in the result row: mysql select round(number+0.0,digits) from testme; +--+ | round(number+0.0,digits) | +--+ |100.42300 | | 85.4 | +--+ 2 rows in set (0.00 sec) This is consistent with the mysql behaviour in any decimal related operations: mysql select 1.20*1.; +-+ | 1.20*1. | +-+ | 1.2000 | +-+ 1 row in set (0.00 sec) ...and this is also the right thing to do, if I remember my school math. But it is not the right thing to do for the result of the round() function. Also how do you define worked. Good question. I meant that it functions in the same manner on both machines. And it is wrong on both machines... :o) However, your question caused me to go back for another look. I found that when a constant instead of a column_id or @variable is inserted for D (round(X,D)) then the output decimal length is truncated to the value of the constant which is consistent with the manual. This is also the behavior that Roger was asking me to recognize but I had on my really dark glasses. Interestingly, if a floating point number is entered as the constant, it is apparently correctly rounded up from .50 before being applied to the calculation. Yes, this was interresting... win2k, 3.23.30-gamma: mysql select round(2.5); ++ | round(2.5) | ++ | 2 | ++ 1 row in set (0.00 sec) mysql select round(number,2.5) from testme; +---+ | round(number,2.5) | +---+ | 100.423 | |85.400 | +---+ 2 rows in set (0.00 sec) So, when using 2.5 for the D parameter in round(X,D) on a machine with the buggy C lib, it is rounded up to 3, even if the result of round(2.5) is 2...!? The round() function must be using a different rounding algorithm when evaluating the D parameter...? -- Roger 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
ODBC for VB application
Hi ppl, I am having problem with my existing application (writen in VB with ODBC to an Access database). The program starts crawling.. after running for a period of time. Slow down the entire production process. I was advise to change the database as the problem was most likely to be due to the Access database. Can anyone please advise how i could go abt it and what are the things i should look out for? Can i just install myODBC and export Access database to mySQL? Not sure how to do that too... Please help! Alvin - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: about installing mysql on windows 98
Hi, Its okey for the server to installed in windows 98 machinei currently use it as my database server. Just download the complete MySQL win32 executable and run MySQLD...and make sure that you're MY.CNF file is located in c:\and it is set as needed Just that simple...I even installed it in two machine...and configure as master slave scheme... R.B.Roa Traffic Management Engineer PhilCom Corporation Tel.No. (088) 858-1028 Mobile No. (0919) 30856267 -Original Message- From: Rajesh Chabria [SMTP:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 12:20 PM To: [EMAIL PROTECTED] Subject:about installing mysql on windows 98 dear sir, please help me out to install the mysql windows version.the problem is i have only windows 98 as stand alone.i donot have windows NT SERVER. so can mysql be installed on windows 98 as stand alone without the help of a server.please mail back. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
get MySQL db size
Li, Friday, March 01, 2002, 8:23:33 AM, you wrote: Leoen Hi, all MySQL team Leoen How can we get MySQL database size? If you want to know the size of disk space used for database you should probably check the size of database directory in the datadir. To know the table size you can use SHOW TABLE STATUS. Look at: http://www.mysql.com/doc/S/H/SHOW_TABLE_STATUS.html -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: about installing mysql on windows 98
Rajesh Chabria, Go here: http://www.webmasterbase.com/article/525/8 Pay attention to details, and you will have Mysql, PHP, and Apache, up and running in no time. I have Win98 second edition. Every thing is working for me. Chuck = - Original Message - From: Rajesh Chabria [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 28, 2002 11:20 PM Subject: about installing mysql on windows 98 dear sir, please help me out to install the mysql windows version.the problem is i have only windows 98 as stand alone.i donot have windows NT SERVER. so can mysql be installed on windows 98 as stand alone without the help of a server.please mail back. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
API errors BORLAND Builder 5.0
Hello , I have some problems with borland builder 5.0. I can't connect to mysql server via API. I have error in obj file -- Best regards, Alexander mailto:[EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL Backup and Recovery
Hi, I am planning to have MySQL database backup and recovery from the web interface. Is it possible to do this. If yes, then what procedure I should follow. If anybody have any idea about this then please, do help me. It's our requirement. Thanks and regards, Chetan Lavti - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Row affected from Mysql Command line and api's
Hi, If anyone can help me !! Suppose I have a table : mysql select * from flag_test; ++--+ | name | flag | ++--+ | Chetan | Y| ++--+ 1 row in set (0.00 sec) I am setting/unsetting the flag field from the api's ; Now if the flag is already set and I executes the Query from the Mysql Command prompt it shows : MySQL update flag_test set flag='Y' where name='chetan'; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 but if the same Query I run from the C program and if I check the return value of mysql_affected_rows(Mysql *) it returns 0 , Actually I am doing something based on it's return value but Instead of Rows matched: 1 what can I do ..? Please, anybody can help me out..?? Thanks and regards, Chetan Lavti - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: get MySQL db size
Hi The question concerns HEAP tables and the answer can be found in Chapter 8 section 8.4 HEAP Tables At 12:04 01/03/2002 +0200, Victoria Reznichenko wrote: Li, Friday, March 01, 2002, 8:23:33 AM, you wrote: Leoen Hi, all MySQL team Leoen How can we get MySQL database size? If you want to know the size of disk space used for database you should probably check the size of database directory in the datadir. To know the table size you can use SHOW TABLE STATUS. Look at: http://www.mysql.com/doc/S/H/SHOW_TABLE_STATUS.html -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php Regards John, Former MySQL Developer - [EMAIL PROTECTED] http://www.rygannon.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: about installing mysql on windows 98
I have Apache and MySQL both installed on W98 with no problem at installation or running. I think, yes, is possible to install and run MySQL only. But how you can use it without php for example? Makis -Original Message- From: Rajesh Chabria [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 6:20 AM To: [EMAIL PROTECTED] Subject: about installing mysql on windows 98 dear sir, please help me out to install the mysql windows version.the problem is i have only windows 98 as stand alone.i donot have windows NT SERVER. so can mysql be installed on windows 98 as stand alone without the help of a server.please mail back. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
about installing mysql on windows 98
Rajesh, Friday, March 01, 2002, 6:20:07 AM, you wrote: RC dear sir, RC please help me out to install the mysql windows version.the problem is i RC have only windows 98 as stand alone.i donot have windows NT SERVER. RC so can mysql be installed on windows 98 as stand alone without the help of a RC server.please mail back. The installation for Windows, especially Win98, is covered in the manual. Please, look at: http://www.mysql.com/doc/W/i/Windows_installation.html http://www.mysql.com/doc/W/i/Win95_start.html You can download MySQL from: http://www.mysql.com/downloads/index.html -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Row affected from Mysql Command line and api's
Hi Chetan, Suppose I have a table : mysql select * from flag_test; ++--+ | name | flag | ++--+ | Chetan | Y| ++--+ 1 row in set (0.00 sec) I am setting/unsetting the flag field from the api's ; Now if the flag is already set and I executes the Query from the Mysql Command prompt it shows : MySQL update flag_test set flag='Y' where name='chetan'; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 but if the same Query I run from the C program and if I check the return value of mysql_affected_rows(Mysql *) it returns 0 , Actually I am doing something based on it's return value but Instead of Rows matched: 1 =The function only returns the number of rows affected/updated, not the number of rows matched (in the WHERE clause). In this case, if the flat was already Y (your interaction from the MySQL client), then the C program will not have had a change to make - and not counted it as affected. =Change the flag to non-Y, and then re-run the C prog. =Regards, =dn - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: about installing mysql on windows 98
At 09:07 01/03/2002 +0200, savaidis wrote: I have Apache and MySQL both installed on W98 with no problem at installation or running. I think, yes, is possible to install and run MySQL only. But how you can use it without php for example? What has PHP got to do with running MySQL. I neither have PHP or Apache and I use MySQL without a problem. Not everybody is a web developer, especially me. I hate web work Makis -Original Message- From: Rajesh Chabria [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 6:20 AM To: [EMAIL PROTECTED] Subject: about installing mysql on windows 98 dear sir, please help me out to install the mysql windows version.the problem is i have only windows 98 as stand alone.i donot have windows NT SERVER. so can mysql be installed on windows 98 as stand alone without the help of a server.please mail back. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Regards John, Former MySQL Developer - [EMAIL PROTECTED] http://www.rygannon.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: API errors BORLAND Builder 5.0
Hi, What kind of API,Component do you use with C++Builder5? Alexander Omelanuk wrote: Hello , I have some problems with borland builder 5.0. I can't connect to mysql server via API. I have error in obj file -- TAKAHASHI, Tomohiro - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Row affected from Mysql Command line and api's
Hi I think you need to read a book on C since C has no notion of a boolean value At 11:40 01/03/2002 +, DL Neil wrote: Hi Chetan, Suppose I have a table : mysql select * from flag_test; ++--+ | name | flag | ++--+ | Chetan | Y| ++--+ 1 row in set (0.00 sec) I am setting/unsetting the flag field from the api's ; Now if the flag is already set and I executes the Query from the Mysql Command prompt it shows : MySQL update flag_test set flag='Y' where name='chetan'; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 but if the same Query I run from the C program and if I check the return value of mysql_affected_rows(Mysql *) it returns 0 , Actually I am doing something based on it's return value but Instead of Rows matched: 1 =The function only returns the number of rows affected/updated, not the number of rows matched (in the WHERE clause). In this case, if the flat was already Y (your interaction from the MySQL client), then the C program will not have had a change to make - and not counted it as affected. =Change the flag to non-Y, and then re-run the C prog. =Regards, =dn - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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, Former MySQL Developer - [EMAIL PROTECTED] http://www.rygannon.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
buggy round()
Hi, there are a couple of bugs related to the round() function. (See the thread 'Can somebody help me with round (columna,columnb) ?') One bug is already well known and documentet, it is related to different C library implementations on different platforms: the result of round(2.55,1) may be 2.5 or 2.6. The other bug is related to using a column name as the decimal parameter to the round() function (select round(col1,col2) from table). The rounding is performed, but the result is padded with zeroes, so that all rows have the same number of decimals. The number of decimals used is the number of decimals in the definition of col1, or if 'col1' is an expression, the highest number of decimals in any of the parameters in the expression. This is wrong, because 1.1000 indicates a higher grade of precision than 1.1, even if it has the same numeric value. While investigating this issue, I came across what I think is a third bug: solaris, 3.23.39-log: mysql select round(0.5,0),round(0.55,1),round(0.555,2); +--+---++ | round(0.5,0) | round(0.55,1) | round(0.555,2) | +--+---++ |0 | 0.6 | 0.56 | +--+---++ 1 row in set (0.00 sec) If 0.5 is rounded down to 0, why is 0.55 and 0.555 rounded up to 0.6 and 0.56? I would have expected 0/0.5/0.55 or 1/0.6/0.56 win2k, 3.23.30-gamma: mysql select round(0.5,0),round(0.55,1),round(0.555,2); +--+---++ | round(0.5,0) | round(0.55,1) | round(0.555,2) | +--+---++ |0 | 0.5 | 0.56 | +--+---++ 1 row in set (0.00 sec) On my win2k box 0.5 and 0.55 is rounded down, but 0.555 is rounded up...? Both my boxes agree on this: mysql select round(0.55-0.5,1),round(0.05,1); +---+---+ | round(0.55-0.5,1) | round(0.05,1) | +---+---+ | 0.1 | 0.0 | +---+---+ 1 row in set (0.00 sec) mysql select 0.55-0.5=0.05; +---+ | 0.55-0.5=0.05 | +---+ | 0 | +---+ 1 row in set (0.00 sec) ...but this is correct on both boxes: mysql select 0.55-0.05=0.5; +---+ | 0.55-0.05=0.5 | +---+ | 1 | +---+ 1 row in set (0.00 sec) Another test: solaris: mysql select round(0.05,1),round(0.15,1),round(0.25,1),round(0.35,1); +---+---+---+---+ | round(0.05,1) | round(0.15,1) | round(0.25,1) | round(0.35,1) | +---+---+---+---+ | 0.0 | 0.2 | 0.2 | 0.4 | +---+---+---+---+ 1 row in set (0.00 sec) Sometimes it rounds up, sometimes it rounds down... win2k: mysql select round(0.05,1),round(0.15,1),round(0.25,1),round(0.35,1); +---+---+---+---+ | round(0.05,1) | round(0.15,1) | round(0.25,1) | round(0.35,1) | +---+---+---+---+ | 0.0 | 0.1 | 0.2 | 0.3 | +---+---+---+---+ 1 row in set (0.00 sec) Always down, that could be ok, but...: mysql select round(0.005,2),round(0.015,2),round(0.025,2),round(0.035,2); +++++ | round(0.005,2) | round(0.015,2) | round(0.025,2) | round(0.035,2) | +++++ | 0.00 | 0.01 | 0.02 | 0.04 | +++++ 1 row in set (0.00 sec) Can anyone confirm if this behaviour is also in the newer versions? Please tell me if there is something wrong with my expectations... -- Roger 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
Access denied for user: (from perl script)
Hi, I have a problem accessing MySQL database. I have a database changes_db and when I access it with mysql -h jon -u join -p changes_db, I have no problems. But if I use Perl script to access same database I get: DBI-connect(database=changes;host=jon;port=) failed: Access denied for user: 'join@jon' to database 'changes_db' at ./test_db.cgi line 15 The script is following: #!/usr/bin/perl -w use strict; # enforce declarations and quoting use DBI; use CGI qw(:all);# import shortcuts $| = 1; # disable buffering my $username = join; my $password = equant; my $database = chances_db; my $driver = mysql; my $port = ''; my $hostname = jon; my $dsn = DBI:$driver:database=$database;host=$hostname;port=$port; my $dbh = DBI-connect($dsn, $username, $password); if ($dbh) { print $DBI::errstr; exit 1; } Regards Jon Ingason Sr Field Ops Eng IP/Router Operation Global One Services AB trading as Equant Solna strandväg 82 PO BOX 1 171 18 SOLNA SWEDEN Work: +46 8 5191 3316 Fax: +46 8 5191 3200 Cellular: +46 708 91 3316 E-mail: [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
PHP and MySQL for a Collaboration project
Hello All, I have been lurking here for the past couple of weeks and learning a bunch, thank you for all of your posts, just listening to you guys is great. We are developing a web based file management interface for collaboration and security. - Login script - Add three levels of security - Admin - Allows editing of files with file locking - User Specific can view some of the files, not all... - Guest - can only view a few files. - Add / Remove users and permissions to view / edit... - Add / Remove files with file description / size and type We are using PHP and MySQL for this, however, I am concerned about the security of some of the more sensitive files. We would like to have them simply in an HTACCESS protected folder, however, we want to use PHP to add and remove the users through a web interface, we don't want people to just be able to type in the URL of the file and get it again, for two reasons, 1. General Privacy 2. Maybe someone has it checked out and editing it. I have read the post about containing images within a MySQL database. Should we store the files inside the DB, using the posted method of storing an image, and relying on MySQL inherent security, the HTACCESS method or does anyone have a better suggestion? Patrick Egan Egan Consulting 15 Elvina Gardens Toronto, Ontario M4P 1X7 T] 416 630 4982 F] 416 488 7187 C] 416 726 4832 Pager] 416 377 9031 E] [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] W] www.eganconsulting.com http://www.eganconsulting.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: MySQLGUI help file
Thi Cao writes: Hi everyone, I recently unpacked the Mysqlgui static binary distribution for windows and placed the MySQL.help file along with the my.cnf.win file in the c:/ root directory. I have the line help_file=c:/MySQL.help (also tried c:\\MySQL.help) in the my.cnf.win file. However, when I start up the mysqlgui executable, I cannot view the help file. Could someone tell me what it is I forgot to do. TIA Thi File name should be my.cnf ... -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
user-defined datatypes
Hi, I want to convert a MS SQL 7 DB to mysql DB. They make use of sp_addtype to define user defined data-types in the DB. Does mysql have the possibillity to define user-defined datatypes? Or is there another way to do it? greetings, Patrick - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: LOAD DATA LOCAL INFILE in Alpha 3.23.49
Rob Steele writes: Thanks. I don't think this feature is working as the documentation says it should. Section 4.2.4 of the manual says: By default all MySQL clients and libraries are compiled with | --enable-local-infile|, to be compatible with MySQL 3.23.48 and before. That seems to not be true, at least with the Aplha binary. Thanks, Rob thanks, we shall check it out !! -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Access denied for user: (from perl script)
Are you using the latest version of DBI? Also, your if ($dbh) { seems a little backward. According to the DBI docs, If the connect fails (see below) it returns undef and sets $DBI::err and $DBI::errstr. So shouldn't your conditional be if (!$dbh) {. Perhaps you are actually connecting. I'm not sure why DBI::errstr would be defined in that case though. Also, I hope that is not your real connection info (i.e. username, password, hostname, database name). If it is, you should change it immediately. Duncan -- Duncan Salada | Titan | www.titan.com/validity Email: [EMAIL PROTECTED] | Voice: 301-925-3222x375 | Fax: 301-925-3216 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 7:18 AM To: [EMAIL PROTECTED] Subject: Access denied for user: (from perl script) Hi, I have a problem accessing MySQL database. I have a database changes_db and when I access it with mysql -h jon -u join -p changes_db, I have no problems. But if I use Perl script to access same database I get: DBI-connect(database=changes;host=jon;port=) failed: Access denied for user: 'join@jon' to database 'changes_db' at ./test_db.cgi line 15 The script is following: #!/usr/bin/perl -w use strict; # enforce declarations and quoting use DBI; use CGI qw(:all);# import shortcuts $| = 1; # disable buffering my $username = join; my $password = equant; my $database = chances_db; my $driver = mysql; my $port = ''; my $hostname = jon; my $dsn = DBI:$driver:database=$database;host=$hostname;port=$port; my $dbh = DBI-connect($dsn, $username, $password); if ($dbh) { print $DBI::errstr; exit 1; } Regards Jon Ingason Sr Field Ops Eng IP/Router Operation Global One Services AB trading as Equant Solna strandväg 82 PO BOX 1 171 18 SOLNA SWEDEN Work: +46 8 5191 3316 Fax: +46 8 5191 3200 Cellular: +46 708 91 3316 E-mail: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Showing results of a search
I am programming the scripts of the Intranet of my Office, and I am using PHP and MySql. I would like that when I execute a search the results would be show on pages with 20 results per page. Is that possible??? Thank you Daniel F. Castro - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL on MAC OS X 10.1
James wrote: I'd like to install MySQL on MAC OS X 10.1 I've notice it's using Darwin 1.4 But the binaries for MySQL appear to say for Darwin 5.1 What should I do? Apparently Apple decided to move Darwin's version number to 5.1 when it shipped the update of OS X 10.1.1. I have heard this was done to get Darwin's version number closer to the version of OS X that it ships with and will at some point in time become the same version number as Mac OS X to make things more uniform. In any case, you can use the Software Updater to update to OS X 10.1.3 which will also update Darwin to 5.3. -- David Steinbrunner mailto:[EMAIL PROTECTED] MFM Communication Software, Inc. http://www.mfm.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
Showing results of a search
I am programming the scripts of the Intranet of my office, and I am using PHP and MySql. I would like that when I execute a search the results would be show on pages with 20 results per page. Is that possible??? Thank you Daniel F. Castro - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: creating dream tables
Here's my query so far: mysql SELECT pj, SUM ( hours ) AS 'Totals', SUM( IF ( MONTH ( period ) = 01, hours, 0 )) AS 'Jan', SUM( IF ( MONTH ( period ) = 02, hours, 0 )) AS 'Feb', SUM( IF ( MONTH ( period ) = 03, hours, 0 )) AS 'Mar', SUM( IF ( MONTH ( period ) = 04, hours, 0 )) AS 'Apr', SUM( IF ( MONTH ( period ) = 05, hours, 0 )) AS 'May', SUM( IF ( MONTH ( period ) = 06, hours, 0 )) AS 'Jun', SUM( IF ( MONTH ( period ) = 07, hours, 0 )) AS 'Jul', SUM( IF ( MONTH ( period ) = 08, hours, 0 )) AS 'Aug', SUM( IF ( MONTH ( period ) = 09, hours, 0 )) AS 'Sep', SUM( IF ( MONTH ( period ) = 10, hours, 0 )) AS 'Oct', SUM( IF ( MONTH ( period ) = 11, hours, 0 )) AS 'Nov', SUM( IF ( MONTH ( period ) = 12, hours, 0 )) AS 'Dec' FROM log WHERE id = '$id' AND YEAR ( period ) = '$sy' AND YEAR ( period ) '$ey' GROUP BY pj; As you can see, I'm getting data from Jan - Dec within one calendar year so there aren't problems with accidentally grabbing data from same month and different year. Also, I'm using an HTML form user to input id and select the year so there shouldn't be any problems with wrong years. I added the sum(hours) as 'totals' to get row totals for all hours per month but so far I'm using a second query to get the grand total hours. mysql SELECT SUM ( hours ) AS 'g_total' FROM log WHERE id='$id' AND YEAR ( period ) = '$sy' AND YEAR ( period ) '$ey'; Now, if you know a way that MySQL can extract the grand total from the first query I'll be able to do in one query what I originally thought I'd have to do in no less than 14! Be well. ~Leif -Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 4:26 PM To: Forer, Leif; [EMAIL PROTECTED] Subject: Re: creating dream tables Leif, What a thorough and thoughtful response! It works like a charm. I'd like to generate a report based on all 12 months of the year but for some strange reason (and I'm guessing you already knew this) the method you suggested only works up to 11. Why is this? What should I do? And, it shouldn't be a big deal to just execute a second and third query that does the row totals for each line and a grand total of all the subtotals. Why not go for broke and make it all work in one go!? What does your current query look like, and what errmsg are you getting? When you talk about one year, it is now (let us say) March, so will the January and February 'numbers' be from this year, and all the others from last year? How do you define this? Warning: at present, if there is more than one year's data in the tbl, then there will be confusion between years. Do you have data in the tbl for every month of the year? Regards, =dn ** This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited. Thank you for your compliance. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Row affected from Mysql Command line and api's
Nope, Sorry, but nowhere I was thinking about the boolean value. I was only talking about the return value of mysql_affected_rows(Mysql *)and it's return type is (unsigned int), which depends upon the no of rows affected by the last query. I have just ask you based upon a very rough table( flag_test).. So, there is no question of returning boolean value..I think you interpreted it wrongly. isn't it ?? By the way, thanks for your suggestion. Thanks and regards, Chetan Lavti -Original Message- From: John Dean [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 5:25 PM To: DL Neil; Chetan Lavti; [EMAIL PROTECTED] Subject: Re: Row affected from Mysql Command line and api's Hi I think you need to read a book on C since C has no notion of a boolean value At 11:40 01/03/2002 +, DL Neil wrote: Hi Chetan, Suppose I have a table : mysql select * from flag_test; ++--+ | name | flag | ++--+ | Chetan | Y| ++--+ 1 row in set (0.00 sec) I am setting/unsetting the flag field from the api's ; Now if the flag is already set and I executes the Query from the Mysql Command prompt it shows : MySQL update flag_test set flag='Y' where name='chetan'; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 but if the same Query I run from the C program and if I check the return value of mysql_affected_rows(Mysql *) it returns 0 , Actually I am doing something based on it's return value but Instead of Rows matched: 1 =The function only returns the number of rows affected/updated, not the number of rows matched (in the WHERE clause). In this case, if the flat was already Y (your interaction from the MySQL client), then the C program will not have had a change to make - and not counted it as affected. =Change the flag to non-Y, and then re-run the C prog. =Regards, =dn - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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, Former MySQL Developer - [EMAIL PROTECTED] http://www.rygannon.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
MyODBC or some other C based API for speed?
Wilbur, Friday, March 01, 2002, 5:28:56 AM, you wrote: WS I'm working on indexing words in web pages, and I'm finding a significant WS issue with the performance of MyODBC, even when I resort to using batch WS mode inserts.. WS I'm currently using the older version of MyODBC, and basically I'm looking WS to determine if anyone is aware of a faster API? Is the newer version WS faster? How about a non-ODBC API? Of course ODBC is slower than a direct driver; this is a fee for universality... Sometimes the difference in performance reaches 2-3 times or even more. So, if you are developing an application that is implied to work only with MySQL - you should better find another interface. On what language your development is done? WS Wilbur sql,database,table.. -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Geographical MySQL Usage
Scalper, Thursday, February 28, 2002, 10:49:59 PM, you wrote: S I am curious about the geographical usage of MySQL. Judging from the users S on this list it seems like it is used more heavily in Europe than in Asia S and the Americas. To date, has there been any formal studies or polls taken? Well, if you define Russia Ukraine as Asia, then MySQL is used heavily in Asia :) S Craig -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Select 8 bit
Uma, Friday, March 01, 2002, 6:27:17 AM, you wrote: UST I am using local language for inserting values in mysql.While sorting in UST mysql is checking 7bits from the right.Is there any thing like this for UST checking 8 bits in mysql That's a question of a readline library, not mysql. Put something like that in ~/.inputrc: set meta-flag on set input-meta on set convert-meta off set output-meta on Hope this will help. UST Thanks in advance -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Showing results of a search
Daniel, Friday, March 01, 2002, 3:22:59 PM, you wrote: DFC I am programming the scripts of the Intranet of my Office, and I am using DFC PHP and MySql. I would like that when I execute a search the results would DFC be show on pages with 20 results per page. Is that possible??? You can use LIMIT clause to get specified rows. You can find info about LIMIT at: http://www.mysql.com/doc/S/E/SELECT.html DFC Thank you DFC Daniel F. Castro -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
How to store an Image on MySQL
Hector, Thursday, February 28, 2002, 7:51:39 PM, you wrote: HR Hi Everybody, I have a problem with MySQL when I try to store HR image file on it. I use a Blob field but the info that must be HR stored there should be between quotations marks right? Like a HR string , i mean GIF89kjflH.. more binary symbols... but if HR the image file information have a quotation in the file the info HR would get truncate and MySQL will not store it. My Question is How HR can I store a Image on MySQL, and I know that is't bettter to use HR a path to the image but I can't do this in that way. Any help HR would be great Thanks. You have to escape some chars. You can find the list of chars to escape and escape sequences at: http://www.mysql.com/doc/S/t/String_syntax.html HR Hector. -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
ODBC for VB application
Alvin, Friday, March 01, 2002, 12:26:20 PM, you wrote: AA I am having problem with my existing application (writen in VB with ODBC to AA an Access database). The program starts crawling.. after running for a AA period of time. Slow down the entire production process. AA I was advise to change the database as the problem was most likely to be due AA to the Access database. AA Can anyone please advise how i could go abt it and what are the things i AA should look out for? AA Can i just install myODBC and export Access database to mySQL? Not sure how AA to do that too... Three days ago Steve Rapaport posted a good instruction about porting MS Access database to MySQL. Here is an edited quote of a message from Steve comes: Basically the easiest way is to export the Access database using export from the file menu, in a CSV format with quotation marks around strings. Caution 1: You will need to remove or escape any newlines in your Access database. For some stupid reason Access allows them in the fields, but has no way to search or replace on them! Caution 2: Use Tab instead of comma as a field separator. Then, in Mysql, make a new database.You will need to manually create the same scheme for each table (this is necessary because there is no way to guess or export the Access scheme, that I know) Indicate the type and size of each field in each table. ORDER IS IMPORTANT. If you get the fields in a different order, this will NOT WORK. Last, on the machine running mysql, change directory to the directory containing the export files, which you may wish to name table1.sql, table2.sql, etc. Use mysqlimport to put them into the database. See the documentation on mysqlimport for this. Be careful to specify the same separator, enclosed-by, etc. as you did when exporting. Caution 3: If you get this step wrong, it may still *appear*to work but your data will not be right. Try again. Don't be disturbed if it takes a few tries. you can use DROP DATABASE name to delete the previous try. Steve, thanks for good answer :) You can also use different administration packages such as MySQL-Front etc. AA Alvin -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL Backup and Recovery
Chetan, Friday, March 01, 2002, 5:56:36 AM, you wrote: CL I am planning to have MySQL database backup and recovery from the web CL interface. CL Is it possible to do this. If yes, then what procedure I should follow. Well, specify what exactly do you need - a backup procedure initiated from the web page; a complete interface to backup system from the web - or what? I cannot understand the connectivity between web and backup techniques... CL Chetan Lavti -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysqld crashes immediately during mysql_install_db or alone : signal 4
Sam, Thursday, February 28, 2002, 5:46:39 PM, you wrote: S I had install today THE RPM version 2.23.49 of MySQL, S files I took from MYSQL.com (and mirrors). I have a S linux computer, RedHat version 7.2. S I had no problem with rpm -i, except with the bench S rpm file. I suggest you to upgrade to 3.23.49a, because: - the .49 was compiled for i686 by accident; .49a is compiled for i386 - the .49 was built with wrong libc libraries - elder binaries has problems with timezones (due to the wrong glibc used) and with some threshold values So, if you are using .48 or .49 - I urge you to upgrade. -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Signal 4 crashes on some x86 Linux machines
Adam, Tuesday, February 26, 2002, 11:12:58 PM, you wrote: AK Sasha, I am on Rehat 7.2 and am experiencing exactly the same signal 4 AK problem. I have pasted the ouput from the rpm install, execution of the AK mysqld with --log, and as you requested, the cat info for my box. AK RPM -i output AK ~~ AK rpm -i MySQL-3.23.49-1.i386.rpm AK Installing all prepared tables AK mysqld got signal 4; Upgrade to 3.23.49a: - the .49 was compiled for i686 by accident; .49a is compiled for i386 - that's the source of SIGILL (Signal 4) - the .49 was built with wrong libc libraries -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysqld got signal 4
xinfo, Tuesday, February 26, 2002, 6:17:04 AM, you wrote: From: [EMAIL PROTECTED] Description: Fresh install of Red Hat 7.1 - no patches or updates of x any kind. Unable to install MySQL 3.23.49. Following the x installation instructions provided. The following steps x were completed successfully: x Synopsis: mysqld fails to execute - got signal 4; x Severity: critical Upgrade to 3.23.49a - 3.23.49 was compiled for i686 by accident. -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Showing results of a search
- Original Message - From: Daniel Ferreira Castro [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 01, 2002 1:22 PM Subject: Showing results of a search I am programming the scripts of the Intranet of my Office, and I am using PHP and MySql. I would like that when I execute a search the results would be show on pages with 20 results per page. Is that possible??? Thank you Daniel F. Castro This is a good site explaining just what you are after... http://www.webmasterbase.com/article.php?pid=0aid=662 Tony - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Row affected from Mysql Command line and api's
At 19:22 01/03/2002 +0530, Chetan Lavti wrote: Nope, Sorry, but nowhere I was thinking about the boolean value. I was only talking about the return value of mysql_affected_rows(Mysql *)and it's return type is (unsigned int), which depends upon the no of rows affected by the last query. I have just ask you based upon a very rough table( flag_test).. So, there is no question of returning boolean value..I think you interpreted it wrongly. isn't it ?? You are correct. I just skipped through your question quickly By the way, thanks for your suggestion. Thanks and regards, Chetan Lavti -Original Message- From: John Dean [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 5:25 PM To: DL Neil; Chetan Lavti; [EMAIL PROTECTED] Subject: Re: Row affected from Mysql Command line and api's Hi I think you need to read a book on C since C has no notion of a boolean value At 11:40 01/03/2002 +, DL Neil wrote: Hi Chetan, Suppose I have a table : mysql select * from flag_test; ++--+ | name | flag | ++--+ | Chetan | Y| ++--+ 1 row in set (0.00 sec) I am setting/unsetting the flag field from the api's ; Now if the flag is already set and I executes the Query from the Mysql Command prompt it shows : MySQL update flag_test set flag='Y' where name='chetan'; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 but if the same Query I run from the C program and if I check the return value of mysql_affected_rows(Mysql *) it returns 0 , Actually I am doing something based on it's return value but Instead of Rows matched: 1 =The function only returns the number of rows affected/updated, not the number of rows matched (in the WHERE clause). In this case, if the flat was already Y (your interaction from the MySQL client), then the C program will not have had a change to make - and not counted it as affected. =Change the flag to non-Y, and then re-run the C prog. =Regards, =dn - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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, Former MySQL Developer - [EMAIL PROTECTED] http://www.rygannon.com Regards John, Former MySQL Developer - [EMAIL PROTECTED] http://www.rygannon.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
ISP Setup
Hi, I'm sure this has been asked before, but I couldn't find it in the archives, so here goes... I want to setup a web server that also has MySQL on it, with several user accounts, each user has their own home directory and a virtual host entry in Apache for their website. I also want to have each users MySQL database(s) physically located within their home directory, under a sub-dir called mysql What is the best way to set this up with regards to file ownership/permissions? I know I can symlink from the mysql database directory to the directory in the users home dir, but then mysql needs r/w access to the db directory files and I need to know the best way of doing this without compromising security, so that one user can't get into another users directory, etc. Thanks, Paul - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
A newbee's question
Hello, can MySQL manage transactions? Someone said me no. Is it true? Thank you Paolo - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 : mysqld crashes immediately during mysql_install_db or alone : signal 4
Thanks for your answer; This morning, as I had no answer, I loaded the binary mysql-3.23.49a-pc-linux-gnu-i686.tar.gz from mysql.com and I run it with success. There is a contradiction with the first point of your explanation the .49 was compiled for i686 by accident; .49a is compiled for i386, isn't it ? I no need answer, this is just for your information. I will try later the RPM version 4.23.49a. Thanks, Sandrine ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
ISp Setup
Hi all, I am a newbie to mysql and I want to setup a web server that also has MySQL on it, with several user accounts, each user has their own home directory and a virtual host entry in Apache for their website. I also want to have each users MySQL database(s) physically located within their home directory, under a sub-dir called mysql How is this done Haj - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: A newbee's question
* Paolo Cavicchini can MySQL manage transactions? Someone said me no. Is it true? Yes and no... this depends on the version of mysql and the used table handler: MyISAM is the default table handler, and it does not support transactions. InnoDB and BDB are two other table handlers, they _do_ support transactions. -- Roger 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
more than one owner?
Is it possible to specify more than one owner in a mysql db? I want to create tables with different owners. Thanks, Eddie - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Error creating InnoDB table/MySQL parser bug?
Hello, Today, I compiled MySQL (mysql-3.23.49.tar.gz) on a Debian Potato system. I configure'd with following options: ./configure --prefix=/usr/local/mysql --with-innodb make and make install ran without any problems. Then I followed the instructions in the INSTALL-SOURCE file. Everything worked fine. Then, I tried to create a InnoDB-Table in the test database: shell /usr/local/mysql/bin/mysql -u root -p mysql use test mysql create table workorders (wo_no varchar(12) not null, foreign_log_no varchar(12) not null default '', primary key(wo_no)) type=innodb; Table creation didn't succeed and I've an error message: ERROR 1005: Can't create table './test/workorders.frm' (errno: 150) After checking my statement and trying to create other InnoDB tables (which succeeded!) I tried: mysql create table workorders (wo_no varchar(12) not null, foreig_log_no varchar(12) not null default '', primary key(wo_no)) type=innodb; Here is what I've got: Query OK, 0 rows affected (0.00 sec) The only different thing is that I changed foreign_log_no to foreig_log_no. It seems that the MySQL parser got irritated when I tried to use foreign as a beginning of a column name. Regards, Borislav -- Borislav Bankov mailto:[EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Emulating a sequence in MySQL?
I need to have unique id's for every data element in my system no matter which table it's in. In Oracle I can create a sequence and with one SQL query I can increment the value and retrieve it for use in my next insert. Can I do this in MySQL? I know about AUTO INCREMENT but that appears to only work on a per table basis. Another key requirement is being able to increment the value and retrieve it with one SQL call. I'm thinking that I can create a table with one column to represent my sequence. The question I have is can I increment the value and retrieve it with one SQL statement? This may sound like a strange set of requirements but we're trying to get our app (a Java JDBC thing) to work across Oracle and MySQL without code changes. Thanks, Rich Rich Bolen Senior Software Developer GretagMacbeth Advanced Technologies Center 79 T. W. Alexander Drive - Bldg. 4401 - Suite 250 PO Box 14026 Research Triangle Park, North Carolina 27709-4026 USA Phone: 919-549-7575 x239, Fax: 919-549-0421 http://www.gretagmacbeth.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: How to get books/manuals from Internet.
At 14:20 +0800 3/1/02, [EMAIL PROTECTED] wrote: Hi, all How to get the e-books of My SQL via download. Thanks , Dominic ZHOU The MySQL Reference Manual is available at: http://www.mysql.com/ Safari has some MySQL books: http://safari.oreilly.com/ The listings include MySQL (New Riders) and MySQL mSQL (O'Reilly). I got a letter yesterday that MySQL and Perl for the Web will be available there soon as well. Safari's a subscriber service. If you're looking for chapters that you can download anytime, pointers to a few are available at: http://www.kitebird.com/mysql-book/ (1 chapter) http://www.kitebird.com/mysql-perl/ (2 chapters) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: more than one owner?
At 10:25 -0500 3/1/02, Edward Peloke wrote: Is it possible to specify more than one owner in a mysql db? I want to create tables with different owners. Databases and tables in MySQL don't have owners. They just exist. But you can grant access to them by more than one MySQL user account, if that's what you mean. Check out the description of the GRANT and REVOKE statements in the MySQL manual. Thanks, Eddie - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
A newbee's question
Paolo, Friday, March 01, 2002, 4:58:54 PM, you wrote: PC Hello, PC can MySQL manage transactions? PC Someone said me no. Is it true? MySQL has transaction-safe tables, such as InnoDB and BDB. InnoDB and BDB tables are supported in MySQL-max. Take a look at the following links where you will find some more info about transactions in MySQL: http://www.mysql.com/doc/S/E/SET_TRANSACTION.html http://www.mysql.com/doc/T/a/Table_types.html http://www.mysql.com/doc/m/y/mysqld-max.html http://www.mysql.com/doc/I/n/InnoDB_transaction_model.html PC Paolo -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
more than one owner?
Edward, Friday, March 01, 2002, 5:25:23 PM, you wrote: EP Is it possible to specify more than one owner in a mysql db? I want to EP create tables with different owners. Yes, it's possible. You can specify many users with different grants on the same database, table, column... You should use GRANT statement. For more clarity look at: http://www.mysql.com/doc/G/R/GRANT.html EP Eddie -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql Date Functions - input
Keith, At 21:51 2002-02-28, you wrote: That has certain advantages, but it's a pain for the user if it's in a application where you have to enter a lot of dates or fill out a form repeatedly. For that sort of data entry, typing digits is far preferable to selecting from a dropdown list. Agreed - but in that case, for an international application, you'd have to let the user select their preferred date format first! Do you know what 2/3/2002 is? Tomorrow or nearly a month ago? I have absolutely no idea... :) The main thing I tried to get across is that handling date input is nearly always dependent on the type of application and the types of dates needed. There is no general solution for dates. (And dates get *really* interesting when you're dealing with partially unknown data (just a year, or only year and month) or historical data (is this date in 1012 a valid date?)...) [Filter fodder: SQL, query] -- Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools The Bookstore - http://books.hshelp.com/ - Books for webmasters and webrookies - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: replication issue (A _REAL_ ISSUE)
I was wrong. My slave servers are STILL 'hanging' and not continuing to replicate. They give no errors, the slave appears to stay running, it just lags behind the master. Nothing I have done has fixed this. Again I'm running 3.23.49. To fix the problem I issue a slave stop, slave start command. This appears to kickstart the slave process and it catches back up to the master. Thoughts? On Wed, Feb 27, 2002 at 01:29:31PM -0600, Michael Douglass said: It would appear that the apparent lagging/slave processes not working (yet telling me they are up) was due to having two slaves set to the same server-id. I will know as more time passes. On Wed, Feb 27, 2002 at 09:27:04AM -0600, Michael Douglass said: David, I am seeing the exact same thing on some Solaris boxen. My database sees a couple of updates every minute or two; and show slave status on the slave always appears to lag behind the master. The data in my tables lag as well as I've done some rudimentary checksumming and have found differences. I've found that if I go to each slave and do a slave stop and a slave start that it restarts the slave connection and then runs through all of the new changes. Mysql community, Thoughts as to what could be causing this? I am using --replicate-do- db command to replicate only a single database; that's about the only thing I can think of that is special about my setup. Thanks, On Mon, Feb 11, 2002 at 10:24:46AM -0800, David Piasecki said: I've recently set up replication on one of my databases. Both master and slave are running MySQL 3.23.46 on FreeBSD 4.1. The only tables that get updated or inserted into hold approximately 140,000 records, growing at a rate of around 50-100 every day. The issue is it is currently taking approximately 20-30 minutes for an update/insert that occurs on the master to show up on the slave. An insert operation on the master usually only takes a second or so, so it doesn't make sense that it should take so long for the slave to update. There is nothing non-standard about either table - each contains approximately 20 columns, one auto-increment field, and one index. Hoping someone has some insight into this matter... BTW, both servers are on the same private network, literally being right next to each other, so I know it's not a network issue. David Piasecki - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 -- Michael Douglass Chief System Engineer Texas Networking, Inc. (512-794-7123) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Michael Douglass Chief System Engineer Texas Networking, Inc. (512-794-7123) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Michael Douglass Chief System Engineer Texas Networking, Inc. (512-794-7123) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
BIG STUPID MISTAKE
Hi all, I just made the stupidest mistake I ever done: I installed mysql on a RH Linux machine. And as usual I wanted to setup the users I need and take out the ones that I don't. Only when I executed a query, I did not realize that instead of deleting two users I deleted all users... And guess what, after that I flushed the privileges and exit mysql (I had no idea what I had just done). Later on I realized I can not connect to the server anymore, and then is when I realized what I had done. My question is: is there any way to connect to mysql server if there is no user in the user table?? Than you all, P.S. Don't judge me, I stayed up all night trying to finish a new project. --Cip-- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SQL 2 Query in 1 table
Hi, Is it possible to make simultaneous 2 SQL queries in a MySQL database( update, insert and the other) on only 1 table. Because my DB is on a server and i I've 5 clients who works on the same table. Samuel -Message d'origine- De: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Date: vendredi 1 mars 2002 17:11 A: BLANCHET Objet: Re: Queries Your message cannot be posted because it appears to be either spam or simply off topic to our filter. To bypass the filter you must include one of the following words in your message: sql,query If you just reply to this message, and include the entire text of it in the reply, your reply will go through. However, you should first review the text of the message to make sure it has something to do with MySQL. Just typing the word MySQL once will be sufficient, for example. You have written the following: Hi, Is it possible to make 2 simultaneous queries ( update, insert and the other) on only 1 table. Because my DB is on a server and i I've 5 clients who works on the same table. Samuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
BIG STUPID MISTAKE
Cip, Friday, March 01, 2002, 6:12:54 PM, you wrote: C I just made the stupidest mistake I ever done: C I installed mysql on a RH Linux machine. And as usual I wanted to setup the C users I need and take out the ones that I don't. Only when I executed a C query, I did not realize that instead of deleting two users I deleted all C users... C And guess what, after that I flushed the privileges and exit mysql (I had C no idea what I had just done). Later on I realized I can not connect to the C server anymore, and then is when I realized what I had done. C My question is: is there any way to connect to mysql server if there is no C user in the user table?? Run mysqld with --skip-grant-tables, then you can create new users. Note: if you start with --skip-grant-tables option you should do FLUSH PRIVILEGES before using GRANT statement. C Than you all, C --Cip-- -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
High Memory Problem
Hi all, I have a seperate linux server with just mysql running on it. But there are alot of other things that I may need to take off. Anyway yesterday I noticed after running TOP that the memory usage was real high. I did a shutdown and checked it after the reboot and the memory usage was way down. Is there something I am doing wrong in mysql that would create such a high memory useage. Or should I be looking at the red hat list to see if it is something else. Joe - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
help me with complicate sql query
Hello sql guru's, I need help find SQL to solve a problem: I have two tables, the first is persons: person_id int unsigned not null auto_increment firstname varchar(25) lastname varchar(25) The second is person_orgs person_id int unsigned not null org_id int unsigned not null A person may be assigned more than one org by using person_orgs table, but they can only be assigned to an org one time by way of application rules/logic. Here is my problem: I need to select a list of persons that have not ever been assigned to an org OR have not been assigned to a specific org, such as org_id = 1, so I tried: select p.firstname,p.lastname from persons p left join person_orgs po on p.person_id = po.person_id where(po.org_id 1 OR po.og_id IS NULL) I thought this was correct, and it does return persons never assigned before, but all it does concerning the specific org_id is to leave out the one record where the person is assigned to org_id = 1. If the person is assigned to org_id =1 plus any additional, then the record for the other org(s) is/are returned, giving me a person I don't need. I have no idea how to do this. It is almost as if I need to transform: person_id org_id 1 1 1 2 1 3 into: person_id org1org2org3 11 2 3 but I don't really know how in sql, and the number of orgs will be different for each person. I know I could build some large associative array in my language of choice and sort through it somehow, that just seems slow and cumbersome. I feel there is some SQL based solution, I just can't grasp it. Can anyone else? Thanks, Brian - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re-baselining replication slaves?
I started replicating the MySQL DB on our production server last month. I was wondering if anyone who has been doing replication for a while has seen the need to resync the slave. (i.e. snapshot the master, install on slave, and re-start replication from snapshot) Are there systems out there that have been replicating for a year plus with no troubles? Thanks. -- Guy Davis Phone: (403) 301-3426 Pason Systems Fax: (403) 301-3499 PGP: 65BA 484B 0B96 5F3B 4D40 DCA2 B2AE 6B5A F52B 1445 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Perl Interface
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I was wondering if anyone knows of a module for perl to talk to mysql w/o DBI/DBD. Some sort of shell interface or something. Mike. - -- * * Mike Baranski * * Security Managment Consulting * * 919-788-9200 Phone* * 919-510-0037 Fax * * [EMAIL PROTECTED] * * GPG Key located on: http://www.keyserver.net/en/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8f7Gun0XmoxBj3PwRAtMUAJ9Gz5DwcpbD0lIJN4x2+jOKoH24/wCfT+LL STwfIAAPDxZ+khMFylKkGgs= =mmex -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: buggy round()
Hi. On Fri, Mar 01, 2002 at 01:14:43PM +0100, [EMAIL PROTECTED] wrote: Hi, there are a couple of bugs related to the round() function. (See the thread 'Can somebody help me with round (columna,columnb) ?') One bug is already well known and documentet, it is related to different C library implementations on different platforms: the result of round(2.55,1) may be 2.5 or 2.6. I would argue whether that is a bug... it is inconsistent on different platforms, but it is consistent with the behaviour of other programs on the same platform. You always break the one or the other thing. Since there is another way to get consistent behaviour across platforms (FLOOR((2.55*10)+0.5)/10), but I know of none to get it consistent with the platform, I prefer the current behaviour. [...] While investigating this issue, I came across what I think is a third bug: solaris, 3.23.39-log: mysql select round(0.5,0),round(0.55,1),round(0.555,2); +--+---++ | round(0.5,0) | round(0.55,1) | round(0.555,2) | +--+---++ |0 | 0.6 | 0.56 | +--+---++ 1 row in set (0.00 sec) If 0.5 is rounded down to 0, why is 0.55 and 0.555 rounded up to 0.6 and 0.56? I would have expected 0/0.5/0.55 or 1/0.6/0.56 Well, if at all, I don't think that this is a new bug, but a reincarnation of the bug above: it's the behaviour of your underlying system lib. But, in fact, I think it is only a misunderstanding. Note that only a limited amount of decimal numbers can represented in the internal floating point format. Others will be represented by one of its neighbours, e.g. mysql SELECT 0.550; +---+ | 0.550 | +---+ | 0.55004440892 | +---+ 1 row in set (0.00 sec) If you look at this representation, it is obvious, that this number will be rounded up to 0.6. The same goes for 0.555. Regards, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Problem with Images and Blobs
Hello, look I'm trying to insert an Image into a blob field with a Normal insert query. I know that the information that will be contained on the blob field should be between (quotation marks), but if inside the info of the image is a quotation mark it should be escaped with a \ (back slash). I was reading a document for perl that use a special function called addslashes, that add a backslash to the characters , ', NULL and the \, I think the NULL character is the Ascii ( 0 ) so in every file I scan I will add a \ before a Ascii (0). After add a \ before an Ascii(0) mysql still tell me that I have an error on say ( I'm trying to save gif image): 'GIF89a' the Image is GIF89a0x00 - this represent a ascii(0) value, so I add: GIF89a\0x00 but the problem is the same, could somebody tell me how can I do that, or what do I need to modify, thanks in advance. Hector. -- Get your free email from www.linuxmail.org Powered by Outblaze - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Perl Interface
Mike, http://www.gossamer-threads.com/scripts/mysqlman/index.htm Its good. David At 11:51 AM 3/1/02 -0500, Mike Baranski wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I was wondering if anyone knows of a module for perl to talk to mysql w/o DBI/DBD. Some sort of shell interface or something. Mike. - -- * * Mike Baranski * * Security Managment Consulting * * 919-788-9200 Phone* * 919-510-0037 Fax * * [EMAIL PROTECTED] * * GPG Key located on: http://www.keyserver.net/en/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8f7Gun0XmoxBj3PwRAtMUAJ9Gz5DwcpbD0lIJN4x2+jOKoH24/wCfT+LL STwfIAAPDxZ+khMFylKkGgs= =mmex -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Problem with Images and Blobs
At 10:09 -0700 3/1/02, Hector Rosas wrote: Hello, look I'm trying to insert an Image into a blob field with a Normal insert query. I know that the information that will be contained on the blob field should be between (quotation marks), but if inside the info of the image is a quotation mark it should be escaped with a \ (back slash). I was reading a document for perl that use a special function called addslashes, That sounds like a document for PHP, actually. that add a backslash to the characters , ', NULL and the \, I think the NULL character is the Ascii ( 0 ) so in every file I scan I will add a \ before a Ascii (0). You should either use placeholders, or convert the value with the DBI quote() function to make it safe for insertion into the INSERT query string. There's no point in messing around with this yourself when DBI will do it for you. After add a \ before an Ascii(0) mysql still tell me that I have an error on say ( I'm trying to save gif image): 'GIF89a' the Image is GIF89a0x00 - this represent a ascii(0) value, so I add: GIF89a\0x00 but the problem is the same, could somebody tell me how can I do that, or what do I need to modify, thanks in advance. Hector. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: more than one owner?
I was thinking more along the lines of creating a db called test and creating two tables: test.clients and test2.clients Like you can do in MSSQL, create many table owners in the same db. -Original Message- From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 11:00 AM To: [EMAIL PROTECTED] Subject: more than one owner? Edward, Friday, March 01, 2002, 5:25:23 PM, you wrote: EP Is it possible to specify more than one owner in a mysql db? I want to EP create tables with different owners. Yes, it's possible. You can specify many users with different grants on the same database, table, column... You should use GRANT statement. For more clarity look at: http://www.mysql.com/doc/G/R/GRANT.html EP Eddie -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Suggestions???
I've recently upgraded to the newest version of php and since doing so many of my pages no longer work when it comes to updating, for whatever reason. I simply do not have the time to waste trying to figure out why so I'm thinking of going back to the previous revision I had on the box. I'm running a Dell pre install box and when I called Dell they told me I could simply use the rpm --oldpackage command. Is this a wise choice? Will it cause me bigger headaches? Will things work right if I do that? Please advise as I am pulling my hair out over here. Thanks Your message cannot be posted because it appears to be either spam or simply off topic to our filter. To bypass the filter you must include one of the following words in your message: sql,query If you just reply to this message, and include the entire text of it in the reply, your reply will go through. However, you should first review the text of the message to make sure it has something to do with MySQL. Just typing the word MySQL once will be sufficient, for example. You have written the following: - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: more than one owner?
At 12:27 -0500 3/1/02, Edward Peloke wrote: I was thinking more along the lines of creating a db called test and creating two tables: test.clients and test2.clients Huh? Those are two tables in different databases, not two tables in the same database. Like you can do in MSSQL, create many table owners in the same db. Well, that's what Victoria said, in effect. You can grant access to multiple people. That's like what you're calling owners. -Original Message- From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 11:00 AM To: [EMAIL PROTECTED] Subject: more than one owner? Edward, Friday, March 01, 2002, 5:25:23 PM, you wrote: EP Is it possible to specify more than one owner in a mysql db? I want to EP create tables with different owners. Yes, it's possible. You can specify many users with different grants on the same database, table, column... You should use GRANT statement. For more clarity look at: http://www.mysql.com/doc/G/R/GRANT.html EP Eddie - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Query structure question
I have a database that tracks letters to the editor published in my paper. The table includes a date field and a status field. Status can be either input or published. What I want to do is create a report that tells me how many letters were published on each of the last 30 days. Is there a way to construct the query so that only one pass is made at the database, or must I loop through the last 30 days counting how many records have published status and equal date? Any suggestions would be appreciated. John Hughes __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.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: buggy round()
* Benjamin Pflugmann [me about round(2.55,1) - 2.5 or 2.6 on different platforms.] I would argue whether that is a bug... it is inconsistent on different platforms, but it is consistent with the behaviour of other programs on the same platform. You always break the one or the other thing. well... I think I understand now... thanks! :) ...but as long as 0.55-0.5 != 0.05 I will call it a bug. It may be well known and hard to fix, but that does not make the expression right. :) Since there is another way to get consistent behaviour across platforms (FLOOR((2.55*10)+0.5)/10), but I know of none to get it consistent with the platform, I prefer the current behaviour. This formula is pretty straight forward... why is it so difficult to implement it in the round() function? I know, read on... ;) [...] While investigating this issue, I came across what I think is a third bug: solaris, 3.23.39-log: mysql select round(0.5,0),round(0.55,1),round(0.555,2); +--+---++ | round(0.5,0) | round(0.55,1) | round(0.555,2) | +--+---++ |0 | 0.6 | 0.56 | +--+---++ 1 row in set (0.00 sec) If 0.5 is rounded down to 0, why is 0.55 and 0.555 rounded up to 0.6 and 0.56? I would have expected 0/0.5/0.55 or 1/0.6/0.56 Well, if at all, I don't think that this is a new bug, but a reincarnation of the bug above: it's the behaviour of your underlying system lib. But, in fact, I think it is only a misunderstanding. Note that only a limited amount of decimal numbers can represented in the internal floating point format. Others will be represented by one of its neighbours, e.g. mysql SELECT 0.550; +---+ | 0.550 | +---+ | 0.55004440892 | +---+ 1 row in set (0.00 sec) yes... yes... yes! Thank you very mutch, it all makes sense now. :o) If you look at this representation, it is obvious, that this number will be rounded up to 0.6. The same goes for 0.555. Yes, it is obvious, I just did not think that far... :) With this inconsistency in mind, is floating point really usefull for anything? I can't think of a project where I would use it... when you have very big and very small values in the same column, and accuracy is not important...? This is not a flame, I really wonder what people use it for! :) More important: this is a trap for novice users, maybe mysql would have been better of without floating point numbers? Keep the decimal/numeric type, but not using floating point as an internal representation, and also not using floating point for decimal constants... just a thought. I suppose a replication setup with master/slave on different platforms could also suffer from this... a statement involving floating point operations may give a different result on the slave... I guess this could mean trouble in some applications. -- Roger 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: Query structure question
SELECT COUNT(*) AS number_of_letters FROM tablename WHERE TO_DAYS(NOW()) - TO_DAYS(datefield) = 30 AND status='published' GROUP BY datefield; But this won't return anything for the days when no letters has been published though... Gurhan -Original Message- From: John Hughes [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 1:02 PM To: [EMAIL PROTECTED] Subject: Query structure question I have a database that tracks letters to the editor published in my paper. The table includes a date field and a status field. Status can be either input or published. What I want to do is create a report that tells me how many letters were published on each of the last 30 days. Is there a way to construct the query so that only one pass is made at the database, or must I loop through the last 30 days counting how many records have published status and equal date? Any suggestions would be appreciated. John Hughes __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Daemon setup question
Hello, I'm running the latest MySQL on RH Linux 7.2, and I'm trying to figure out how to make the MySQL server accessible via the net (on port 3306, I assume). Right now, the server is just accessible from the localhost. -J - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: more than one owner?
Edward Peloke wrote: I am trying to get it to work more like it does in MSSQL. In MSSQL, you can create a db named whatever and have several different owners in the database. For example in a database named 'Eddie' I can create a table named ed.table1, pe.table2, etc. In MYSQL, I can only create tables prefixed by the db name, eddie.table1, eddie.table2. correct Thanks, Eddie -Original Message- Eddie: I see your point. I wouldn't get hung up on what MySQL looks like relative to MSSQL. Use the MSSQL Query Tool for a day and they start to look pretty identical. There's really no direct comparison between MSSQL security and MySQL security interfaces, however. They look different and there's no MMC for MySQL, but the implementation you're trying to effect actually would look identical in either if you look at the grant section of the MySQL manual outside the context of the MMC/MySQL administrative tool you're using. In MSSQL you can create a user and the applet in MMC lets you assign rights at that time along with setting global and db/table/right specific things. You can also go into the Security section (forget what it's called) in MSSQL MMC and do the same things. In MySQL, the MMC could be one of several that people use out there, but you can effect the same result. The example given previously does exactly what it appears you're attempting to accomplish: GRANT USAGE ON *.* TO test@localhost; GRANT USAGE ON *.* TO test2@localhost; GRANT ALL PRIVILEGES ON db.* TO test@localhost IDENTIFIED BY 'some_pass'; GRANT ALL PRIVILEGES ON db.* TO test2@localhost IDENTIFIED BY 'some_pass'; If you have a db named 'Eddie' on your server you won't have tables named ed.table1 and pe.table2. They'll be named Eddie.table1 and Eddie.table2; correct. I'd have never thought to put a period in a table name under MSSQL, which is what appears to have happened on your MSSQL Server per your example. Standard db naming conventions follow this form: db.table.field. WRT creating 'tables prefixed by the db name' I'd encourage you to look at it as: mysqladmin create Eddie mysql mysql USE Eddie; mysql CREATE TABLE Table1 (tid int); mysql INSERT INTO Table1 VALUES(1); mysql SELECT * FROM Table1; -or- mysql SELECT * FROM Eddie.Table1; -or- mysql USE mysql; mysql SELECT Eddie.Table1.tid FROM Eddie.Table1; If your schema uses periods in it's implementation, I'd look at correcting that before trying to think about it in MySQL terms (or Oracle, Sybase, DB2, PostreSQL for that matter). But the 4 grant statements above will give you a DB that 2 users own {have full permissions to except for GRANT}. Regards, Van -- = Linux rocks!!! http://www.dedserius.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
Changing ft_min_word_len
I need to change the variable ft_min_word_len, in mysql 4.0.1 The manual doesn't say how: Here's the closest it comes: SHOW VARIABLES shows the values of some MySQL system variables. You can also get this information using the mysqladmin variables command. If the default values are unsuitable, you can set most of these variables using command-line options when mysqld starts up. See section 4.1.1 mysqld Command-line Options. (Apparently not this one, it's not mentioned in the link.) later in the page... ft_min_word_len The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT index have to be rebuilt after changing this variable. Again no mention of how it can be changed. Anyone know? I hope I don't have to rebuild the dist... -steve - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySql 4.01 and libmysqlclient.so.10
I have installed MySql 3.23.49, PHP 4.06, and Apache 1.3.20 successfully on my RH 7.2 box. Now I try to install MySql 4.01 (after removing MySql 3.23.49) I get a Php-mysql.4.xx requires libmysqlclient.so.10. My attempt to install MySql 4.01 ends there. I did some reading and found that libmysqlclient.so.10 comes with MySql 3.23.xx. I surfed my directories to find that MySql 4.01 installs libmysqlclient.so.11 I installed theses packages using the RH RPM Manager. Am I missing something? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Please Help! MySql 4.01/PhP 4.06 looking for Libmysqlclient.so.10?
I have installed MySql 3.23.49, PHP 4.06, and Apache 1.3.20 successfully on my RH 7.2 box. Now I try to install MySql 4.01 (after removing MySql 3.23.49) I get a Php-mysql.4.xx requires libmysqlclient.so.10. My attempt to install MySql 4.01 ends there. I did some reading and found that libmysqlclient.so.10 comes with MySql 3.23.xx. I surfed my directories to find that MySql 4.01 installs libmysqlclient.so.11 I installed theses packages using the RH RPM Manager. Am I missing something? Ron Arenas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Please Help! MySql 4.01/PhP 4.06 looking for Libmysqlclient.so.10?
Ronald Arenas wrote: I have installed MySql 3.23.49, PHP 4.06, and Apache 1.3.20 successfully on my RH 7.2 box. Now I try to install MySql 4.01 (after removing MySql 3.23.49) I get a Php-mysql.4.xx requires libmysqlclient.so.10. My attempt to install MySql 4.01 ends there. I did some reading and found that libmysqlclient.so.10 comes with MySql 3.23.xx. I surfed my directories to find that MySql 4.01 installs libmysqlclient.so.11 I installed theses packages using the RH RPM Manager. Am I missing something? Ron Arenas - Ron: Might make sense to stick with a stable MySQL 3.23.xx db for now. Unless, of course, you need the enhanced features in 4.xx. Also (OT), I'd recommend getting the most current version of PHP 4.x due to the recent CERT announcement on the file upload flaw. PHP can be found at php.net. Regards, Van -- = Linux rocks!!! http://www.dedserius.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: Please Help! MySql 4.01/PhP 4.06 looking for Libmysqlclient.so.10?
Hi, Try to upgrade PHP to the latest version (4.1.2) , it should run fine. Regards, Jocelyn Fournier - Original Message - From: Ronald Arenas [EMAIL PROTECTED] To: Mysql [EMAIL PROTECTED] Sent: Friday, March 01, 2002 9:18 PM Subject: Please Help! MySql 4.01/PhP 4.06 looking for Libmysqlclient.so.10? I have installed MySql 3.23.49, PHP 4.06, and Apache 1.3.20 successfully on my RH 7.2 box. Now I try to install MySql 4.01 (after removing MySql 3.23.49) I get a Php-mysql.4.xx requires libmysqlclient.so.10. My attempt to install MySql 4.01 ends there. I did some reading and found that libmysqlclient.so.10 comes with MySql 3.23.xx. I surfed my directories to find that MySql 4.01 installs libmysqlclient.so.11 I installed theses packages using the RH RPM Manager. Am I missing something? Ron Arenas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: SQL 2 Query in 1 table
On Friday 01 March 2002 9:21 am, BLANCHET wrote: Hi, Is it possible to make simultaneous 2 SQL queries in a MySQL database( update, insert and the other) on only 1 table. Because my DB is on a server and i I've 5 clients who works on the same table. Samuel For reasonable definitions of the word 'simultaneous', the answer is yes. Read up in the MySQL manual about locking, though. For 'spam' filter: MySql, INSERT, SELECT FROM 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
Re: Changing ft_min_word_len
Hi! On Mar 01, Steve Rapaport wrote: I need to change the variable ft_min_word_len, in mysql 4.0.1 The manual doesn't say how: Here's the closest it comes: SHOW VARIABLES shows the values of some MySQL system variables. You can also get this information using the mysqladmin variables command. If the default values are unsuitable, you can set most of these variables using command-line options when mysqld starts up. See section 4.1.1 mysqld Command-line Options. (Apparently not this one, it's not mentioned in the link.) Really ? `-O, --set-variable var=option' Give a variable a value. `--help' lists variables. You can find a full description for all variables in the `SHOW VARIABLES' section in this manual. *Note SHOW VARIABLES::. later in the page... ft_min_word_len The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT index have to be rebuilt after changing this variable. Again no mention of how it can be changed. Anyone know? I hope I don't have to rebuild the dist... No, you don't :) ft_min_word_len is normal mysqld variable, and can be set in mysqld command-line or in /etc/my.cnf (~/.my.cnf). Regards, Sergei -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany ___/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Please Help! MySql 4.01/PhP 4.06 looking for Libmysqlclient.so.10?
PHP is looking for the client library that gets installed with MySQL 3.23.4+. Now, you can try a QUICK fix that might not work, but it's worth a shot. Go to the directory that has the libmysqlclient.so.11 file and type the following: ln -s libmysqlclient.so.11 libmysqlclient.so.10 That should create the file libmysqlclient.so.10 that links to ...so.11. If the client library is vastly different, though, it might not work. If it doesn't work, you should go uninstall PHP, go to the directory where everything was being compiled, edit the necessary files to have PHP use libmysqlclient.so.11 instead (this might be in the Makefile - but be sure you run a make clean first), and recompile. I don't know how different the PHP RPM will be, but there should be a place where you can change the reference to libmysqlclient. I use FreeBSD's ports system and it has a special configure script that creates a little addon to the Makefile that specifies the library version numbers like 10 or 11, and you can change that file before compiling. - Jonathan -Original Message- From: Ronald Arenas [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 12:19 PM To: Mysql Subject: Please Help! MySql 4.01/PhP 4.06 looking for Libmysqlclient.so.10? I have installed MySql 3.23.49, PHP 4.06, and Apache 1.3.20 successfully on my RH 7.2 box. Now I try to install MySql 4.01 (after removing MySql 3.23.49) I get a Php-mysql.4.xx requires libmysqlclient.so.10. My attempt to install MySql 4.01 ends there. I did some reading and found that libmysqlclient.so.10 comes with MySql 3.23.xx. I surfed my directories to find that MySql 4.01 installs libmysqlclient.so.11 I installed theses packages using the RH RPM Manager. Am I missing something? Ron Arenas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: High Memory Problem
What is the memory being used for? Linux aggressively caches data, so if most of the memory is showing up as 'cached' or 'buffered', then the high memory usage is caused the system's normal response to lots of database and disk activity. It's trying to keep as much data in RAM as possible. This is a good thing. A well-tuned loaded Linux system will frequently have only 10% of memory free at any given time. james montebello On Fri, 1 Mar 2002, Joe Bifano wrote: Hi all, I have a seperate linux server with just mysql running on it. But there are alot of other things that I may need to take off. Anyway yesterday I noticed after running TOP that the memory usage was real high. I did a shutdown and checked it after the reboot and the memory usage was way down. Is there something I am doing wrong in mysql that would create such a high memory useage. Or should I be looking at the red hat list to see if it is something else. Joe - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Re-baselining replication slaves?
Hi Jeremy, Just out of curiosity, what kind of tables are you using on your production system? MyISAM, InnoDB, a mix of the two, etc... Thanks, --jeff - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Guy Davis [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, March 01, 2002 9:51 AM Subject: Re: Re-baselining replication slaves? On Fri, Mar 01, 2002 at 09:49:33AM -0700, Guy Davis wrote: I started replicating the MySQL DB on our production server last month. I was wondering if anyone who has been doing replication for a while has seen the need to resync the slave. (i.e. snapshot the master, install on slave, and re-start replication from snapshot) Only when I really mess something up. :-( Then I pull out mysqlsnapshot: http://jeremy.zawodny.com/mysql/ to make the job easier. Are there systems out there that have been replicating for a year plus with no troubles? Thanks. We've been in the range of 250 days on ours. I would have been over a year if I hadn't messed up a master/slave conversion due to lack of sleep. Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 22 days, processed 702,252,025 queries (366/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
if statements
I'm performing a query on 2 tables: mysql SELECT log.id, SUM (log.hours), empnum.lname FROM log, empnum WHERE log.id = '26009' AND log.id=empnum.id GROUP BY hours; Empty set (0.01 sec) The log table contains id numbers (plus a bunch of other data) but no corresponding names. The name are all stored in the empnum table. The problem is, there are instances where the id exists in the log table but not in the empnum table. In this case, MySQL returns and empty set. My question is: how can I still get MySQL to return all the info from the log table when it doesn't find a corresponding id entry in the empnum table? Can I use an if statement somehow? Here's a query of the same id number but performed on just the log table (to prove that there is an id entry in the log table but not the empnum table): mysql SELECT log.id, SUM (log.hours) FROM log WHERE log.id = '26009' GROUP BY id; +---++ | id | sum(log.hours) | +---++ | 26009 | 619.0 | +---++ 1 row in set (0.00 sec) ** This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited. Thank you for your compliance. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
dumb (re)newbie question...
Hey All, I recently got back into mysql again and haven't programmed for it in almost a year and have a really dumb newbie question. I need to add another row of data to an existing table what is the command to do so? Not like an UPDATE command where you input data into the table, but rather a whole new row (or maybe column) or the table. like if you have 7 values for the table, I want to be able to add an 8th value. Please advise... Thanks! -Alex Big Al Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySql 4.01 and libmysqlclient.so.10 - TEMP FIX
Ronald, I ran into exactly the same problem you describe after compiling a new MySQL v4... I think I can offer you an unsophisticated workaround (read: HACK!), but I'd defer to others on the list who know much more about this than I do... Your problem is because your new compile (or binary install) is expecting the layout previously used by mySQL v3. Until you sort this out, the quick fix is to make a link to libmysqlclient.so from where php 'thinks' it is. On SuSE SPARC, these directories work; you should interpret/infer/accommodate as required for your architecture: Create these links: /usr/lib/libmysqlclient.so.10 - /usr/local/lib/mysql/libmysqlclient.so.11 /usr/lib/libmysqlclient.so.11 - /usr/local/lib/mysql/libmysqlclient.so.11 This should make BOTH MySQL and PHP happy, but does not fix the problem with Apache - you may run into - about mod_auth_mysql. If anyone can offer us more, please do! LP I have installed MySql 3.23.49, PHP 4.06, and Apache 1.3.20 successfully on my RH 7.2 box. Now I try to install MySql 4.01 (after removing MySql 3.23.49) I get a Php-mysql.4.xx requires libmysqlclient.so.10. My attempt to install MySql 4.01 ends there. I did some reading and found that libmysqlclient.so.10 comes with MySql 3.23.xx. I surfed my directories to find that MySql 4.01 installs libmysqlclient.so.11 I installed theses packages using the RH RPM Manager. Am I missing something? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Changing ft_min_word_len
At 21:02 +0100 3/1/02, Steve Rapaport wrote: I need to change the variable ft_min_word_len, in mysql 4.0.1 It's a server variable, so you set it the same way as another other variable. Here's what's in my my.cnf file: [mysqld] set-variable= ft_min_word_len=3 The manual doesn't say how: Here's the closest it comes: SHOW VARIABLES shows the values of some MySQL system variables. You can also get this information using the mysqladmin variables command. If the default values are unsuitable, you can set most of these variables using command-line options when mysqld starts up. See section 4.1.1 mysqld Command-line Options. (Apparently not this one, it's not mentioned in the link.) later in the page... ft_min_word_len The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT index have to be rebuilt after changing this variable. Again no mention of how it can be changed. Anyone know? I hope I don't have to rebuild the dist... -steve You don't. You'll have to rebuild your FULLTEXT indices after restarting the server, of course. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Inserting text error
Hi, I have an application running under Access 2000 with linked MySQL tables. At the moment I m trying to run a query to populate a second table. Some of the data in the query is a text description and for some reason is throwing up an error when I try to insert into the table. The error itself seems to appear as soon as there is a space between words in the description. Is there something I have overlooked or something I am doing wrong to cause this? Alex --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.325 / Virus Database: 182 - Release Date: 19/02/2002 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: dumb (re)newbie question...
Hi Big Al: Here is an example: INSERT INTO friends_table(first_name,last_name) VALUES('John','Johnson'); Check out: http://www.mysql.com/doc/I/N/INSERT.html At 15:36 3/1/02 -0600, you wrote: Hey All, I recently got back into mysql again and haven't programmed for it in almost a year and have a really dumb newbie question. I need to add another row of data to an existing table what is the command to do so? Not like an UPDATE command where you input data into the table, but rather a whole new row (or maybe column) or the table. like if you have 7 values for the table, I want to be able to add an 8th value. Please advise... Thanks! -Alex Big Al Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: dumb (re)newbie question...
Awesome thanks, I thought it was under the INSERT command at first, but I guess its the ALTER command, thanks bro! I'll check out the online manual some more! Thanks! -Alex Big Al Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: [EMAIL PROTECTED] - Original Message - From: Nathan [EMAIL PROTECTED] To: Alex Behrens [EMAIL PROTECTED] Sent: Friday, March 01, 2002 3:44 PM Subject: Re: dumb (re)newbie question... New row = INSERT INTO table VALUES ... New column = ALTER TABLE add column_name column_defs Both are well documented in the online manual, though I prefer the PDF version. Cheers, # Nathan - Original Message - From: Alex Behrens [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 01, 2002 2:36 PM Subject: dumb (re)newbie question... Hey All, I recently got back into mysql again and haven't programmed for it in almost a year and have a really dumb newbie question. I need to add another row of data to an existing table what is the command to do so? Not like an UPDATE command where you input data into the table, but rather a whole new row (or maybe column) or the table. like if you have 7 values for the table, I want to be able to add an 8th value. Please advise... Thanks! -Alex Big Al Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MySql 4.01 and libmysqlclient.so.10 - TEMP FIX
Perhaps the rpm expects to perform a (forced) upgrade Ç: -Original Message- ... Your problem is because your new compile (or binary install) is expecting the layout previously used by mySQL v3. ... If anyone can offer us more, please do! LP I have installed MySql 3.23.49, PHP 4.06, and Apache 1.3.20 successfully on my RH 7.2 box. Now I try to install MySql 4.01 (after removing MySql 3.23.49) I get a Php-mysql.4.xx requires libmysqlclient.so.10. My attempt to install MySql 4.01 ends there. I did some reading and found that libmysqlclient.so.10 comes with MySql 3.23.xx. I surfed my directories to find that MySql 4.01 installs libmysqlclient.so.11 I installed theses packages using the RH RPM Manager. Am I missing something? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
FLOATing point bug? Or just a SQL rule
I am not sure if this is going to sound like a stupid question but here it goes... If I have a table with a Float field and, an entry in that field that has at least one decimal place, and I try to do a SELECT * FROM some_table WHERE some_float_field = 3.2 the query will return 0 rows even when there is a matching row. Hope I described this well .. I am running the latest 3.23 release (49a I think) Is this a bug in MySQL or does it have something to do with a SQL definition? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: buggy round()
Hi. On Fri, Mar 01, 2002 at 07:10:10PM +0100, [EMAIL PROTECTED] wrote: [...] ...but as long as 0.55-0.5 != 0.05 I will call it a bug. It may be well known and hard to fix, but that does not make the expression right. :) Well, IMHO no, a bug is an unexpected flaw. The imperfection of the float and real types of the according standard were by design and are well-known. It is also well documented in the manual. A kind of deficiency from the end user's view (i.e. not providing a perfect floating type). Okay, but that's just a matter of wording. Since there is another way to get consistent behaviour across platforms (FLOOR((2.55*10)+0.5)/10), but I know of none to get it consistent with the platform, I prefer the current behaviour. This formula is pretty straight forward... why is it so difficult to implement it in the round() function? I know, read on... ;) Hm. Don't know. Did not care until now. The explanation of the ROUND() function explains to take the work-around if consistent behaviour is wished. And I did not asked further until now. Maybe there are other problems which we don't see at the moment. [...] With this inconsistency in mind, is floating point really usefull for anything? I can't think of a project where I would use it... when you have very big and very small values in the same column, and accuracy is not important...? This is not a flame, I really wonder what people use it for! :) Well, float is called an approximate storage type, and therefore I would think that it is usable in all cases, where an approximated value (up to a certain precision) is good enough. More important: this is a trap for novice users, maybe mysql would have been better of without floating point numbers? Keep the decimal/numeric type, but not using floating point as an internal representation, and also not using floating point for decimal constants... just a thought. Think the other way around: If the other option is to have no floating point type at all, a not perfect one may be good enough for many cases. I would think that novices aren't aware of the different issues involved when rounding numbers (you don't want to round 0.5 always only up [or down] in statistical data because that will introduce an systematical error with large data sets) and therefore the slight errors they will get using float are not bigger than those they introduce by ignorance. Also, this problem is explained in detail in the manual: http://www.mysql.com/doc/N/u/Numeric_types.html http://www.mysql.com/doc/P/r/Problems_with_float.html So if someone cares (to read), she will know to rather avoid float if she didn't really understood it. I suppose a replication setup with master/slave on different platforms could also suffer from this... a statement involving floating point operations may give a different result on the slave... I guess this could mean trouble in some applications. Interesting question. Until now I did not think of that (well, neither I am currently using float types), but yes, that could become a problem (replication data is currently transferred as string representation, AFAIK). Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Inserting text error
What is your query? What error message do you get? On Friday 01 March 2002 2:46 pm, Alexander Shaw wrote: Hi, I have an application running under Access 2000 with linked MySQL tables. At the moment I m trying to run a query to populate a second table. Some of the data in the query is a text description and for some reason is throwing up an error when I try to insert into the table. The error itself seems to appear as soon as there is a space between words in the description. Is there something I have overlooked or something I am doing wrong to cause this? Alex --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.325 / Virus Database: 182 - Release Date: 19/02/2002 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: FLOATing point bug? Or just a SQL rule
On Friday 01 March 2002 2:51 pm, Thomas LaCicero wrote: I am not sure if this is going to sound like a stupid question but here it goes... If I have a table with a Float field and, an entry in that field that has at least one decimal place, and I try to do a SELECT * FROM some_table WHERE some_float_field = 3.2 the query will return 0 rows even when there is a matching row. Hope I described this well .. I am running the latest 3.23 release (49a I think) Is this a bug in MySQL or does it have something to do with a SQL definition? This is a bug in your understanding of floating point numbers. The basic answer is that you cannot compare two floating point numbers in _ANY_ computer language using =. Check a small delta around the number you are searching for or store the float field as an integer (e.g. 32 in the above). This is related to the reason that you cannot write 1/3 in decimal... the number goes out to infinity. Now, consider binary. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySql 4.01 and libmysqlclient.so.10 - TEMP FIX
I would not recommend that. I completely messed up my RH 7.2 system when I tried to forced the MySQL install with 4.1. I had to reinstall the system to make it function right. There might have been an easier way to fix all the broken problems that I caused, but I couldn't. I just moved my data and reinstalled. It wasn't worth the time of trying to fix all the problems since an install can be done and have it up and running within 2 hours. Jim Lucas - Original Message - From: Land, Christopher [EMAIL PROTECTED] To: mySQL [EMAIL PROTECTED] Sent: Friday, March 01, 2002 1:52 PM Subject: RE: MySql 4.01 and libmysqlclient.so.10 - TEMP FIX Perhaps the rpm expects to perform a (forced) upgrade Ç: -Original Message- ... Your problem is because your new compile (or binary install) is expecting the layout previously used by mySQL v3. ... If anyone can offer us more, please do! LP I have installed MySql 3.23.49, PHP 4.06, and Apache 1.3.20 successfully on my RH 7.2 box. Now I try to install MySql 4.01 (after removing MySql 3.23.49) I get a Php-mysql.4.xx requires libmysqlclient.so.10. My attempt to install MySql 4.01 ends there. I did some reading and found that libmysqlclient.so.10 comes with MySql 3.23.xx. I surfed my directories to find that MySql 4.01 installs libmysqlclient.so.11 I installed theses packages using the RH RPM Manager. Am I missing something? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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