mysql4 on win nt
Hello, i installed mysql-max-4. i need use czech sorting - i set [mysqld] default-character-set=czech but create table xx (t varchar(10)); insert into xx values('a'); insert into xx values('c'); insert into xx values('t'); insert into xx values('s'); insert into xx values('b'); insert into xx values('d'); select * from xx order by t; +--+ | t| +--+ | a| | b| | c| | d| | s| | t| +--+ insert into xx values('è'); (è is c with grave accent) in czech language is è after c select * from xx order by t; +--+ | t| +--+ | è| -- bad | a| | b| | c| -- must be after this letter. | d| | s| | t| +--+ So where is problem ? when trying set win1250 charset i got (setting charset to latin 2 produce is same problem): C:\Program Files\mysql\bin\mysql.exe: File 'C:\mysql\\share\charsets\?.conf' not found (Errcode: 2) C:\Program Files\mysql\bin\mysql.exe: Character set '#26' is not a compiled character set and is not specified in the 'C:\mysql\\share\charsets\Index' file C:\mysql\\share\ -- this path is invalid!!! in my.ini i set: basedir=C:/Program Files/mysql datadir=C:/Program Files/mysql/data language=C:/Program Files/mysql/share/czech character-sets-dir=C:/Program Files/mysql/share/charsets default-character-set=win1250 skip-innodb Michal table, sql, database - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Bench come to me...
Trying to get the benchmark 3.23.43 installed but it says I need MYSQL-DBI-perl-bin which I can't seem to locate. Looked at cpan.org and there was no module named that. I found plenty of modules when I did a search on mysql, but nothing named specifically that, so I'm confused on what to get. Anyone know which module I need that includes MYSQL-DBI-perl-bin? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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...... mysql error! please reply~ here is South Korea.
Hi, errno 13 is permission denied. Possibly you installed mysql as root, and are trying to run as a normal user? Change the permissions in you data directory so the user running the mysqld server can read/write the files. Quentin Here is New Zealand! -Original Message- From: BungyJump [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 30 October 2001 1:29 p.m. To: [EMAIL PROTECTED] Subject: Please.. mysql error! please reply~ here is South Korea. I'am not english speak. sorry~ ^^;; [error] # ./bin/safe_mysqld --user=mysql Starting mysqld daemon with databases from /usr/local/mysql/data 011030 09:04:16 mysqld ended # [./mysql/data/host_name.err] -- 011030 09:04:15 mysqld started 011030 9:04:16 /usr/local/mysql/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 011030 9:04:16 /usr/local/mysql/bin/mysqld: Normal shutdown 011030 09:04:16 mysqld ended -- exist /usr/local/mysql/data exist /usr/local/mysql/data/mysql/host.frm [For reference] # pwd /usr/local/mysql # ls COPYING INSTALL-BINARY configurelib manual.txt scripts support-files COPYING.LIB README data man manual_toc.html sharetests ChangeLogbin include manual.html mysql- test sql-bench # # pwd /usr/local/mysql/data # ls host_name.err mysql test # # pwd /usr/local/mysql/data/mysql # ls columns_priv.MYD db.MYDfunc.MYD host.MYD tables_priv.MYD user.MYD columns_priv.MYI db.MYI func.MYI host.MYI tables_priv.MYI user.MYI columns_priv.frm db.frm func.frmhost.frm tables_priv.frm user.frm # Please REPLY~~ Please ~~~ T_T;; ToT;; my e-mail address:[EMAIL PROTECTED] or [EMAIL PROTECTED] === ¿ì¸® ÀÎÅͳÝ, Daum http://www.daum.net ¼Û±Ý, 1/nû±¸, ȸºñ°È±â! À̸ÞÀÏ ÇÑÅëÀ¸·Î ÇØ°áÇÑ´Ù ¢Ñ ¸ÞÀϹðÅ· http://mailbank.daum.net/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail mysql-unsubscribe- [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php The information contained in this email is privileged and confidential and intended for the addressee only. If you are not the intended recipient, you are asked to respect that confidentiality and not disclose, copy or make use of its contents. If received in error you are asked to destroy this email and contact the sender immediately. Your assistance is appreciated. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
using DISTINCT
Hi, Is it possible to get all data; SELECT * FROM and still get some fields filtered by DISTINCT? Jari Mäkelä database,sql,query,table - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
innodb file size usage
Hello! Is there any way to know how much space is used in the innodb data files? So if I have for example : innodb_data_file_path = ibdata1:200M;ibdata2:400M; how much of the 600MB actually is used at the moment Thx! Elm database,sql,query,table - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: innodb file size usage
Hi, how much of the 600MB actually is used at the moment I'm sure there'a a better way to do it, but this one works: mysql show table status like 'your_innodb_table' \G ... Comment: InnoDB free: 3739648 kB Best Regards, Sasa - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: createing database
Franck Collineau writes: I have read the manual again. I can connect as root (i type: mysql -u root -p then password and i have the prompt) But when i type: mysql --user=root mysql i have the message: ERROR 1045: Access denied for user: 'root@localhost' (using password NO) mysql --help shows you this: -p[password], --password[=...] Password to use when connecting to server If password is not given it's asked from the tty. In other words, you must specify -p (without a password) if you want to be asked for a password. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
performance..
Hai, I'm Radha and i'm working with mysql my question is how to make a database faster, because if i use mysql over a telephone line or internet my database is hanging or it shuts down.. Maybe you can tell me how to make my database faster.. looking forward for your reaction radha - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SV: Comparing strings as ints
select floor('5') = floor('6'); TK -Opprinnelig melding- Fra: Daniel James [mailto:[EMAIL PROTECTED]] Sendt: 30. oktober 2001 04:32 Til: [EMAIL PROTECTED] Emne: Comparing strings as ints Hi Everyone, After staring blankly at the mysql manual for a long time, I thought it might be time to ask the list... I have a table setup with a varchar(20) column, I am using this column to store a price, the reason I chose varchar(20) is because the prices I am dealing with are fairly large and I wanted to guarintee 20 digits. There are no characters like '$' or '.' stored in this column. Now, If I select and where this column = somevalue everything is good and works.. but! when I use a string as somevalue it all goes nuts, because mysql will convert the string to an integer if the other value in the comparison is an integer, but if both are strings it's a slight problem. The reason I want to compare it with a string is the data is from a web based form and contains an escaped string. I don't want anyone playing with the database. Here is the problem another way... select '5' = '6'; = 1 select '5' = '4'; = 0 select '5' = '40'; = 0- eegad. does anyone know how I can get around this? Thanks, Daniel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: SSL in version 3 and 4
Joel Rees writes: Hi. My coworker needs to check how well SSL is supported in which versions. Any comments on SSL in v. 3? or about the stability of v. 4? Joel Rees [EMAIL PROTECTED] SSL i supported in MySQL 4, which is now in alpha stability phase. -- 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
LIKE '%%' with fields.
Hi, I'm not sure if this query is possible. I'm trying to look through a table text field for a filter. So the text field would be a domain lookup and the filter might be something like ns1.istorm.ca I can get this too work, If the filter and the domain are the same : SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.domain LIKE filter.filter) I can also get this too work : SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.record LIKE '%ns1.istorm.ca%') But if I try to combine the two SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.record LIKE '%filter.filter%') I'll only get whois_domain.record's that I've inserted the word filter.filter within. Can anyone help me ? _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Connection errors and server polling
Hi all, As explained in the archive, a connection on port 3306 via a standard 'open socket' and close again, creates connection errors, resulting in a blocked host. However - since we replicate our servers, to ensure high availabity, we like to poll if the primary is up. We do this, because when a host is down (not the mysql server, but the entire machine), it takes quite a long time for the client (in this case PHP) to realise that the server is not available. Therefore we use an optimized version of the code provided by Michael Tanoviceanu in his phpbuilder article (http://www.phpbuilder.com/columns/tanoviceanu2912.php3). We're now forced to set the max_connect_errors to a high number and flush the hosts now and then, so I'd like to propose the following options: --disable-host-check: for people filtering the traffic to mysql --ignore-hosts: build a 'trust' environment for the webservers or other known clients If these are already available, then it's not obvious to me, which they are. If the can be compiled in or the host check can be compiled out, I'd love to know how. Otherwise, I'd like to know if you (the developer and the user) find these useful and/or if these will be implemented. Met vriendelijke groeten / With kind regards, IDG.nl Melvyn Sopacua WebMaster - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Organization ...
Hi guys! I'm sorry if this is one of those questions that is repeated but ... I must pose it :) . I'm doing a database to support all of my companies activities, for instance we have client information, order information, contacts, suppliers, etc etc. Now, the structure is beginning to grow a little, with Lookup tables and all, I'm heading for the 40 table mark. I can't really know if this number is usual or even small, but I would rather have things separated to improve my own organization. Having said this my question is as follows: I would like to organize tables under specific groups, for example, all issues related to clients should go to a group named 'Clients' [original stuff here :)] . As far as I can go, I can do this by putting these tables under a new Database called 'Clients' but ... my issue is this, on my server I can expect to have other databases not related to my company, and I would like to be able to separate all these things so that I don't get a 200 database list every time I use 'Show databases'. What I want to know, is how to tackle this, for instance, is there a way to define what databases one user can see, so that he may only see his own databases. I'm looking for theories, hope anyone has one :) Thanks in advance guys... David Ramalho - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SV: LIKE '%%' with fields.
use : SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.record LIKE concat('%',filter.filter,'%') TK -Opprinnelig melding- Fra: abercrombie fitch [mailto:[EMAIL PROTECTED]] Sendt: 30. oktober 2001 13:35 Til: [EMAIL PROTECTED] Emne: LIKE '%%' with fields. Hi, I'm not sure if this query is possible. I'm trying to look through a table text field for a filter. So the text field would be a domain lookup and the filter might be something like ns1.istorm.ca I can get this too work, If the filter and the domain are the same : SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.domain LIKE filter.filter) I can also get this too work : SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.record LIKE '%ns1.istorm.ca%') But if I try to combine the two SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.record LIKE '%filter.filter%') I'll only get whois_domain.record's that I've inserted the word filter.filter within. Can anyone help me ? _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
SV: LIKE '%%' with fields.
ehh .. forgot a ) on my sql. the right one is below SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.record LIKE concat('%',filter.filter,'%')) TK -Opprinnelig melding- Fra: abercrombie fitch [mailto:[EMAIL PROTECTED]] Sendt: 30. oktober 2001 13:35 Til: [EMAIL PROTECTED] Emne: LIKE '%%' with fields. Hi, I'm not sure if this query is possible. I'm trying to look through a table text field for a filter. So the text field would be a domain lookup and the filter might be something like ns1.istorm.ca I can get this too work, If the filter and the domain are the same : SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.domain LIKE filter.filter) I can also get this too work : SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.record LIKE '%ns1.istorm.ca%') But if I try to combine the two SELECT whois_domain.domain FROM whois_domain, filter WHERE (whois_domain.record LIKE '%filter.filter%') I'll only get whois_domain.record's that I've inserted the word filter.filter within. Can anyone help me ? _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: persistent shutdown of MySQL 3.23.42 Max on Win2K
Hi! At 11:27 AM 10/30/01 -, you wrote: Sorry for the slow reply here, all has been exceptionally busy... We have some tables as InnoDB and some as MyISAM... We upgraded to 4.0 and the problem went away (we also wanted the ability to change the length of the stopwords for the fulltext indices. We've found 4 to be exceptionally stable now that we have the different buffers set optimally, what I think happened is that we were maxing out the memory for the service even though we were using the default settings as per the manual althoug our box has more memory. The site gets hit pretty hard sometimes and I think we were just pushing too hard. Once we dropped the innodb_buffer_pool_size from 80M to 40M the speed and stability we'd had before returned and the number of inserts requiring locks or transactions is far outweighed by those which don't Good that 4.0.0 works so well :). But it is still peculiar if mysqld shuts down without printing anything to the MySQL error log. The name of the error log is usually something like 'hostname'.err. Have you looked into it if it contains something special? There was a bug in versions = 3.23.43 which could cause random crashes. That bug is fixed in 3.23.44 and 4.0.1. I have not tested what happens in Windows 2000 if the OS runs out of memory. In NT a pop-up appears saying that 'the system is running low in virtual memory'. cheers Heikki best wishes Chris Regards, Heikki http://www.innodb.com -Original Message- From: Heikki Tuuri [mailto:[EMAIL PROTECTED]] Sent: Friday, October 26, 2001 8:24 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: persistent shutdown of MySQL 3.23.42 Max on Win2K Chris, What does InnoDB print to the error log when it restarts? Run mysql-max-nt.exe from the MS-DOS prompt, not as a service. When it crashes, please send me the output if any. If you have the MS Developer Studio, you should try running mysqld.exe inside it. When it crashes, please send me screen captures about the places where it happened (parameter values, variables, functions in the stack etc.). I found and fixed a bug in 3.23.43 which can cause random crashes. 3.23.44 should be out next week, and you could try with it. Have you converted your tables to the InnoDB format or are they MyISAM? Do you use BLOBs? Regards, Heikki Hi Folks Bit of a puzzle this... we upgraded our MySQL to MySQL-Max on Win2k on a box and the reliability has plummeted, whereas before we were only having to restart for maintenance about once a month, we now find it restarts itself two or three times a day... any ideas?? The box has 0.5Gb of memory and the site is well hit, but hardly goes above 10% of CPU usage... we're using IIS and ADO with a couple of Java classes for database access... The error log gives us no real insights at all... I've included the my.cnf in case there's something glaring... thanks for the help, we're thinking of going back to the non Max version, it's be a shame to lose transactions though :-( Chris [mysqld] basedir=d:/mysql datadir=d:/mysql/data innodb_data_file_path = ibdata1:500M;ibdata2:500M innodb_data_home_dir = d:\mysql\ibdata set-variable = innodb_mirrored_log_groups=1 innodb_log_group_home_dir = d:\mysql\iblogs set-variable = innodb_log_files_in_group=3 set-variable = innodb_log_file_size=30M set-variable = innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 innodb_log_arch_dir = d:\mysql\iblogs innodb_log_archive=0 set-variable = innodb_buffer_pool_size=80M set-variable = innodb_additional_mem_pool_size=10M set-variable = innodb_file_io_threads=4 set-variable = innodb_lock_wait_timeout=50 Dr Christopher Thorpe Information Architect GenomeBiology - biology for the post-genomic era w http://www.genomebiology.comt +44 (0) 20 7631 9184 (direct) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 unions..
I have a table: CREATE TABLE vote_count ( id int(10) DEFAULT '0' NOT NULL auto_increment, imageid int(6) DEFAULT '0' NOT NULL, catid int(4) DEFAULT '0' NOT NULL, count int(6) DEFAULT '0' NOT NULL, PRIMARY KEY (id), INDEX (imageid, catid) ); and am trying to query for all image id's that are in an intersection of catid's I supply and are a difference from all of the union'd catid's I also supply.. SELECT vc0.imageid, vc4.catid, vc5.catid FROM vote_count AS vc0 LEFT JOIN vote_count AS vc1 ON vc0.imageid = vc1.imageid LEFT JOIN vote_count AS vc2 ON vc0.imageid = vc2.imageid LEFT JOIN vote_count AS vc3 ON vc0.imageid = vc3.imageid LEFT JOIN vote_count AS vc4 ON vc0.imageid = vc4.imageid LEFT JOIN vote_count AS vc5 ON vc0.imageid = vc5.imageid WHERE vc0.catid='15' AND vc1.catid='37' AND vc2.catid='52' AND vc3.catid='10' AND NOT ( vc4.catid = '30' OR vc4.catid = '1' OR vc5.catid = '1' OR vc5.catid = '30' ) GROUP BY vc0.imageid ORDER BY vc0.count + vc1.count + vc2.count + vc3.count DESC; This and everything else I've tried so far doesn't seem to work. The first intersection I can make work without problem but then making a union of the other catid's and finding the difference seems to mess up. The problem seems to be that while I can strip individual rows from the results the imageid still gets through because the catid is only linked once per image per row. I also tried this with similar poor results: SELECT vc0.imageid, vc0.catid, vc1.catid, vc2.catid, vc3.catid, vcneg.catid FROM vote_count AS vc0 LEFT JOIN vote_count AS vc1 ON vc0.imageid = vc1.imageid LEFT JOIN vote_count AS vc2 ON vc0.imageid = vc2.imageid LEFT JOIN vote_count AS vc3 ON vc0.imageid = vc3.imageid LEFT JOIN vote_count AS vcneg ON vc0.imageid = vcneg.imageid WHERE vc0.catid='15' AND vc1.catid='37' AND vc2.catid='52' AND vc3.catid='10' AND ( vcneg.catid != '30' OR vcneg.catid != '1' ) GROUP BY vc0.imageid ORDER BY vc0.count + vc1.count + vc2.count + vc3.count DESC; Can anyone tell me how to do this the right way? Thanks. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Connection errors and server polling
Hello Melvyn! However - since we replicate our servers, to ensure high availabity, we like to poll if the primary is up. We do this, because when a host is down (not the mysql Big Brother is a bit of an overkill for the 'one' thing you're asking for but it's a dynamite generic 'server monitoring' tool and you might find other uses for it. It can page or email you when 'something' does down. http://www.bb4.com Have a :) day! jb ob-filter-words: table sql database -- jim barchuk [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: Connection errors and server polling
Hi Jim, At 08:48 10/30/2001 -0500, jim barchuk wrote: Hello Melvyn! However - since we replicate our servers, to ensure high availabity, we like to poll if the primary is up. We do this, because when a host is down (not the mysql Big Brother is a bit of an overkill for the 'one' thing you're asking for but it's a dynamite generic 'server monitoring' tool and you might find other uses for it. It can page or email you when 'something' does down. http://www.bb4.com Hi Jim, I know about big-brother and it might work for other tasks, but not in this case. The reason for replication is that our visitors are not bothered by our problems or maintenance windows. So - this php function, checks if mysql is alive and then disconnects after 15 seconds or successfull connect, whichever comes first. So there's a 15 second delay max. However - we also use a file-based caching mechanism, so in theory only users within that 15 second period experience the delay (and every 20 minutes another 15 seconds if the downtime lasts). If the primary is not available, the php function uses the secondary server, to ensure the information is processed. Big Brother cannot help out there and like I said, it's not only problems, it can also mean maintenance windows, like disk-array maintenance or a kernel upgrade. Have a :) day! THanx - and u2. jb Met vriendelijke groeten / With kind regards, IDG.nl Melvyn Sopacua WebMaster - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Connection errors and server polling
Hi Jim, At 08:48 10/30/2001 -0500, jim barchuk wrote: Hello Melvyn! However - since we replicate our servers, to ensure high availabity, we like to poll if the primary is up. We do this, because when a host is down (not the mysql Big Brother is a bit of an overkill for the 'one' thing you're asking for but it's a dynamite generic 'server monitoring' tool and you might find other uses for it. It can page or email you when 'something' does down. http://www.bb4.com Hi Jim, I know about big-brother and it might work for other tasks, but not in this case. The reason for replication is that our visitors are not bothered by our problems or maintenance windows. So - this php function, checks if mysql is alive and then disconnects after 15 seconds or successfull connect, whichever comes first. So there's a 15 second delay max. However - we also use a file-based caching mechanism, so in theory only users within that 15 second period experience the delay (and every 20 minutes another 15 seconds if the downtime lasts). If the primary is not available, the php function uses the secondary server, to ensure the information is processed. Big Brother cannot help out there and like I said, it's not only problems, it can also mean maintenance windows, like disk-array maintenance or a kernel upgrade. Have a :) day! THanx - and u2. jb Met vriendelijke groeten / With kind regards, IDG.nl Melvyn Sopacua WebMaster - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
web-based interface for manipulating MySQL tables?
Is there any pre-written code that allows users, authenticated over the Web, to view MySQL tables in their database as HTML tables? Desirable features for something like that would include: - tables are displayed in row-and-column format, with a few blank rows at the bottom where you can fill in new values and click to add them to the database (assuming that the user viewing the table has the appropriate rights) - values that represent foreign keys are hyperlinked, so that when you click on them, you're taken to the appropriate row in the other table etc. -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: web-based interface for manipulating MySQL tables?
http://www.phpwizard.net/projects/phpMyAdmin/ might be the place to start It does not have hyperlinking, though -Original Message- From: Bennett Haselton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 8:16 AM To: [EMAIL PROTECTED] Subject: web-based interface for manipulating MySQL tables? Is there any pre-written code that allows users, authenticated over the Web, to view MySQL tables in their database as HTML tables? Desirable features for something like that would include: - tables are displayed in row-and-column format, with a few blank rows at the bottom where you can fill in new values and click to add them to the database (assuming that the user viewing the table has the appropriate rights) - values that represent foreign keys are hyperlinked, so that when you click on them, you're taken to the appropriate row in the other table etc. -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Comparing strings as ints
I have a table setup with a varchar(20) column, I am using this column to store a price, the reason I chose varchar(20) is because the prices I am dealing with are fairly large and I wanted to guarintee 20 digits. There are no characters like '$' or '.' stored in this column. Now, If I select and where this column = somevalue everything is good and works.. but! when I use a string as somevalue it all goes nuts, because mysql will convert the string to an integer if the other value in the comparison is an integer, but if both are strings it's a slight problem. The reason I want to compare it with a string is the data is from a web based form and contains an escaped string. I don't want anyone playing with the database. Here is the problem another way... select '5' = '6'; = 1 select '5' = '4'; = 0 select '5' = '40'; = 0- eegad. does anyone know how I can get around this? Daniel, The stated problem has to do with 20-digit numbers stored as varchar data, yet the examples given are one and two character strings. The apparent problem is not due to the comparison operator, but an inaccurate representation of 20-digit numbers using one and two digits! Solving this logic requires a real step back in time. Imagine you are teaching a youngster basic arithmetic with multi-digit numbers and it'll all fall into place... In standard (decimal) arithmetic, using real or integer numbers, the mathematical system 'lines up' dissimilarly-sized (scale) numbers (according to the stated or implied decimal point) and 5 is indeed less than 40 - or (hint, hint) 05.0 is less than 40.0. However strings are 'lined up' differently (from the first character rightwards, not the decimal point leftwards), so when there are dissimilar numbers of digits to the left of the (implied) decimal point, per the example above, comparison logic all turns to custard... (in the example above: 5 'units' (or 'ones', depending upon where you went to school) are being compared with 4 'tens') If it can be assumed that the 20-character numbers are all stored with a stated or implied decimal point with (say) two 'decimal digits' to its right, then string comparisons may continue to be applied, and successfully, PROVIDED both strings are 'normalised' into the same VARCHAR(20) format and are filled with leading zeros or spaces: thus '0...005' is less than '0...040'. If the decimal point is not in a 'fixed' position within the 20 characters, all is not (yet) lost, but you will have your work cut out for you (so a review of the formatting decision would also be appropriate) - please get back to me. 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
Mysql query optimiser performance question (second post)
Hello, sorry, this is the second post, caue I had no reaction. Just wanted to talk about the MySql Query Optimiser. After having performance problems with some queries, I arrived to thoses conclusions: - The order of joins with constants and column have no effect on the speed of the query - MySql make all joins between tables before extracting the required rows table t1 +---+---+ |num|let| +---+---+ | 1 | A | | 2 | A | | 3 | B | +---+---+ table t2 +---+---+ |num|let| +---+---+ | 1 | A | | 2 | B | +---+---+ If I do something like : select t1.num from t1,t2 where t2.let='A' and t1.let=t2.let MySql seem's make in memory a table like : +--+--+--+--+ |t1.num|t1.let|t2.num|t2.let| +--+--+--+--+ | 1 | A | 1 | A | | 2 | A | 1 | A | | 3 | B | 2 | B | +--+--+--+--+ and then extract the first and the second lines while it could have first extract the first line of the table t2 and then make all the required joins. That would have done in memory : +--+--+--+--+ |t1.num|t1.let|t2.num|t2.let| +--+--+--+--+ | 1 | A | 1 | A | | 2 | A | 1 | A | +--+--+--+--+ I don't remeber cause I've not played with Oracle from several month, but I think Oracle was doing like this. Could you tell me if such an Optimiser is planned with MySql 4 ?? Maybe such an Optimiser is useless ? (when we'll have sub-queries we'll be able to restrict the number of joins in memory) ps: MySql 4.0.0 Alpha work fine on Amiga ;) -- Best regards, SixK // \\ //Amiga spirit will never die \\/ 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
installing mysql 3.23.43 - unrecognized option
Hi, On Tru64 5.1, I am trying to install mysql 3.23.43. I follow the steps in section 2.3 of running scripts/mysql_install_db. It comes back with the error: /usr/local/mysql-test/libexec/mysqld: unrecognized option `--password=reqid' a password I never typed in. After that, it gives the usage help for the command. Does anyone have any pointers to what I am doing wrong? Thanks, Cheers, Douglas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Delete performance
Sorry, semantic miscommunication. It's a heavily used table and the performance of other queries done during the mass deletion slows, which is a problem since this is a near-realtime system where delays in queries cause performance issues in other dependent modules. Jeremy Zawodny wrote: On Mon, Oct 29, 2001 at 05:49:57PM -0500, C. Williams wrote: Does anyone know how to speed the performance of deletes on a large table? I have a large table w/ approx. 180,000,000 rows, with the following table structure: [snip] It takes approximately 45 seconds to delete an hour's worth of data( 90323 rows) from the table, which tends to be a performance problem since it's a table with a fair amount of contention. Platform: x86 OS:RH Linux 2.4.6 MySQL V: 3.23.42-max DB File Type: InnoDB Memory:1 GB HD:130GB SCSI If you're using InnoDB, where's the contention? Jeremy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Connection errors and server polling
Loud\ As\ A\ Whisper.aviMelvyn Sopacua wrote: Hi Jim, At 08:48 10/30/2001 -0500, jim barchuk wrote: Hello Melvyn! However - since we replicate our servers, to ensure high availabity, we like to poll if the primary is up. We do this, because when a host is down (not the mysql Big Brother is a bit of an overkill for the 'one' thing you're asking for but it's a dynamite generic 'server monitoring' tool and you might find other uses for it. It can page or email you when 'something' does down. http://www.bb4.com Hi Jim, I know about big-brother and it might work for other tasks, but not in this case. The reason for replication is that our visitors are not bothered by our problems or maintenance windows. So - this php function, checks if mysql is alive and then disconnects after 15 seconds or successfull connect, whichever comes first. So there's a 15 second delay max. However - we also use a file-based caching mechanism, so in theory only users within that 15 second period experience the delay (and every 20 minutes another 15 seconds if the downtime lasts). If the primary is not available, the php function uses the secondary server, to ensure the information is processed. Big Brother cannot help out there and like I said, it's not only problems, it can also mean maintenance windows, like disk-array maintenance or a kernel upgrade. I don't know if it is what you are looking for, but moodss (at http://jfontain.free.fr/) has the ability to send email alerts (based on thresholds), and includes ping and MySQL modules (such as myquery which supports any select type query). I am working on moomps, due soon, which is the daemon version on moodss (a graphical tool). Let me know if you need more information on using those tools to solve your problem. Jean-Luc - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: installing mysql 3.23.43 - unrecognized option
At 9:51 AM -0500 10/30/01, Douglas B. Jones wrote: Hi, On Tru64 5.1, I am trying to install mysql 3.23.43. I follow the steps in section 2.3 of running scripts/mysql_install_db. It comes back with the error: /usr/local/mysql-test/libexec/mysqld: unrecognized option `--password=reqid' a password I never typed in. After that, it gives the usage help for the command. Does anyone have any pointers to what I am doing wrong? Look in /etc/my.cnf and see if you find that line there. If you do, remove the -- at the beginning of the line. The double-dash is only for options given on the command line. They should not be used for options in option files. Thanks, Cheers, Douglas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: installing mysql 3.23.43 - unrecognized option
Douglas B. Jones writes: Hi, On Tru64 5.1, I am trying to install mysql 3.23.43. I follow the steps in section 2.3 of running scripts/mysql_install_db. It comes back with the error: /usr/local/mysql-test/libexec/mysqld: unrecognized option `--password=reqid' a password I never typed in. After that, it gives the usage help for the command. Does anyone have any pointers to what I am doing wrong? Thanks, Cheers, Douglas Hi! Please check out whether you have some global config file, like /etc/my.cvf with password option under [mysqld] options header. -- 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
ROW_FORMAT=compressed has no effect on db file sizes
I created one table with the command: CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE, id INT UNSIGNED NOT NULL); and another one with the command: CREATE TABLE pet2 (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE, id INT UNSIGNED NOT NULL) ROW_FORMAT=compressed; and then populated both of them with 10,000 rows of data, from a file pet.txt with 10,000 lines of text, created with the perl script: open(PET, pet.txt); for (my $i = 1; $i = 1; ++$i) { if ($i%100 == 0) { print $i, \n; } print PET snortbennett mammal m 1986-12-08 \N $i\n; } close(PET); But the files used to store data for both tables take up the same amount of disk space: [root@server1 menagerie]# ls -l total 912 -rw-rw1 mysqlmysql 36 Oct 30 09:14 pet.MYD -rw-rw1 mysqlmysql 82944 Oct 30 09:14 pet.MYI -rw-rw1 mysqlmysql8704 Oct 30 09:10 pet.frm -rw-rw1 mysqlmysql 36 Oct 30 09:20 pet2.MYD -rw-rw1 mysqlmysql 82944 Oct 30 09:20 pet2.MYI -rw-rw1 mysqlmysql8704 Oct 30 09:20 pet2.frm Did I do something wrong? -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
3.23.43 fails merge and some rpl tests on HPUX 10.20
Description: Configured and built mysql 3.23.43 without errors on a 9000/782 running HPUX 10.20. All tests pass except: merge [ fail ] rpl01 [ fail ] rpl02 hangs rpl04 [ fail ] prl07 [ fail ] rpl11 hangs rpl14 hangs rpl_mystery22 hangs rpl_sporadic_master hangs Tests rpl 1, 4, and 7 fail with no additional output. The remaining rpl tests seem to just hang, with no output after the lines TEST USER SYSTEM ELAPSEDRESULT I let rpl 2 run for 7 hours, aborted 11 after 30 minutes, and gave up on the rest after about 5 minutes each. Merge fails with: - $./mysql-test-run --local merge Installing Test Databases Removing Stale Files Installing Master Databases 011030 18:04:33 ../sql/mysqld: Shutdown Complete Installing Slave Databases 011030 18:04:33 ../sql/mysqld: Shutdown Complete Starting MySQL daemon Loading Standard Test Databases Starting Tests TEST USER SYSTEM ELAPSEDRESULT merge [ fail ] Below are the diffs between actual and expected results: --- *** r/merge.result Wed Oct 3 19:21:17 2001 --- r/merge.reject Tue Oct 30 18:04:41 2001 *** *** 6,15 2 table 3 t2 a b ! 3 t1 ! 3 t2 ! 2 table ! 2 table 1 Testing 1 Testing table typepossible_keys key key_len ref rowsExtra --- 6,15 2 table 3 t2 a b ! 1 Testing ! 1 Testing ! 1 Testing ! 1 Testing 1 Testing 1 Testing table typepossible_keys key key_len ref rowsExtra *** *** 106,114 incr othr incr othr 1 10 ! 2 24 ! 4 33 ! 3 53 count(*) 10 count(*) --- 106,114 incr othr incr othr 1 10 ! 1 10 ! 1 10 ! 1 10 count(*) 10 count(*) --- Please follow the instructions outlined at http://www.mysql.com/doc/R/e/Reporting_mysqltest_bugs.html to find the reason to this problem and how to report this. Aborting. To continue, re-run with '--force'. Ending Tests Shutting-down MySQL daemon Master shutdown finished Slave shutdown finished - I've seen this exact output reported by others (running Solaris 2.5.1 and Linux, if I recall correctly), but have not seen any resolution. On a side note, mysql-test-run was determined to use /bin/diff, which doesn't support '-a' on my system, rather than /usr/local/bin/diff. I had to edit the script to set DIFF in order to get the output above. I didn't see any mention of the need to do this, or a better method, in the documentation. How-To-Repeat: build for hpux 10.20, run 'make test' or run './mysql-test-run --local testname' in mysql-test. Fix: Unknown Submitter-Id: submitter ID Originator:Michael Stassen Organization: Indiana University MySQL support: none Synopsis: 3.23.43 fails merge and some rpl tests on HPUX 10.20 Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.43 (Source distribution) Environment: System: HP-UX dr B.10.20 A 9000/782 2015374635 two-user license Some paths: /usr/local/bin/perl /usr/local/bin/make /usr/local/bin/gcc /usr/ccs/bin/cc GCC: Reading specs from /usr/local/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.3/specs gcc version 2.95.3 20010315 (release) Compilation info: CC='gcc' CFLAGS='-DHPUX -I/opt/dce/include -I/usr/local/include -O2' CXX='gcc' CXXFLAGS='-DHPUX -I/opt/dce/include -I/usr/local/include -O2' LDFLAGS='-L/usr/local/lib' LIBC: -r-xr-xr-x1 bin bin 1867776 May 2 16:51 /lib/libc.1 -r--r--r--1 bin bin 2456780 May 2 16:51 /lib/libc.a lrwx--1 root sys15 Oct 17 12:29 /lib/libc.sl - /usr/lib/libc.1 -r-xr-xr-x1 bin bin 1867776 May 2 16:51 /usr/lib/libc.1 -r--r--r--1 bin bin 2456780 May 2 16:51 /usr/lib/libc.a lrwx--1 root sys15 Oct 17 12:29 /usr/lib/libc.sl - /usr/lib/libc.1 Configure command: ./configure --disable-largefile --with-pthread --with-named-thread-libs=-ldce --disable-shared --prefix=/usr/local/mysql --with-mysqld-user=mysql --libexecdir=/usr/local/mysql/sbin --datadir=/usr/local/mysql/data --with-libwrap - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe,
RE: installing mysql 3.23.43 - unrecognized option
Hi, My /etc/my.cnf has the 'password' line commented out. Also, according to the instructions, that files is not copied over yet at the time one does the db install command: mysql_install_db. Any ideas? Thanks, Cheers, Douglas p.s.: I copied Sinisa on this since he also came up with the same idea. -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 10:10 AM To: Douglas B. Jones; [EMAIL PROTECTED] Cc: Douglas B Jones Subject: Re: installing mysql 3.23.43 - unrecognized option At 9:51 AM -0500 10/30/01, Douglas B. Jones wrote: Hi, On Tru64 5.1, I am trying to install mysql 3.23.43. I follow the steps in section 2.3 of running scripts/mysql_install_db. It comes back with the error: /usr/local/mysql-test/libexec/mysqld: unrecognized option `--password=reqid' a password I never typed in. After that, it gives the usage help for the command. Does anyone have any pointers to what I am doing wrong? Look in /etc/my.cnf and see if you find that line there. If you do, remove the -- at the beginning of the line. The double-dash is only for options given on the command line. They should not be used for options in option files. Thanks, Cheers, Douglas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 access violation
Hello (again) I have a rather weird problem. I have some service running in my application that is updating some tables every hour. Now this works after the first hour but after the second hour I suddenly get an access violation on the query object. This is the rather normal code.. con-select_db(hf-database); /** create table if not exists */ query create table IF NOT EXISTS TABLE_NAME (id int not null auto_increment, symbol char(32), name char(255), .. /** execute query and reset query object */ query.execute(RESET_QUERY); All this is surrounded by a try, catch. I'm using MSVC6.0 and I'm getting the '0xC005: Access Violation', so basicly a NULL POINTER access. Does a query object drop the database connection after some time? Thanks for any help! Elm sql , mysql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql query optimiser performance question (second post)
SixK writes: - MySql make all joins between tables before extracting the required rows How do you mean? It can only start returning rows when all tables that are needed have been joined, but of course it doesn't create a temporary table with the product of all tables before it starts to return rows. Try executing a query that would return a billion rows, and get just a few before aborting. Also try joining ten tables with a million (or a billion if you wish) rows each, and look at what the optimizer does (with EXPLAIN). //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Connection problem
Hi! When i type: mysql -u franck -p then my password, it's ok. My machine's name is r-lx-collineau When i type mysql - h r-lx-collineau -u franck -p then my password, i have this message: ERROR 1130: host 'r-lx-collineau' is not allowed to connect to this MySQL server Can anybody help me ? Franck - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: persistant insert trouble
Thank you for the tip Johnny, I'll copy that code to a snippet and use that from now on. (C: From: Johnny Withers [EMAIL PROTECTED] To: 'Curtis Gordon' [EMAIL PROTECTED] Subject: RE: persistant insert trouble Date: Tue, 30 Oct 2001 08:04:58 -0600 Next time, instead of banging your head on the desk trying to figure out why somehting like this doesn't work, add some error checking to your PHP script. $query=INSERT INTO .duser(username, upass, fname, lname, hphone, .haddress, hcity, hstate, hcountry, hemail, utype) .VALUES('$username','$upass'.'$fname','$lname','$hphone',' .$haddress','$hcity','$hstate','$hcountry','$hemail','$utype'); ; if(!mysql_query($query)) { $errMsg=Failed Query: $querybr\n.mysql_errno(). : .mysql_error(); die($errMsg); } Your sanity will be safe. - Johnny Withers [EMAIL PROTECTED] p. 601.853.0211 c. 601.209.4985 -Original Message- From: Curtis Gordon [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 6:39 PM To: [EMAIL PROTECTED] Subject: persistant insert trouble INSERT INTO duser (username, upass, fname, lname, hphone, haddress, hcity, hstate, hcountry, hemail, utype) VALUES ('$username','$upass'.'$fname','$lname','$hphone','$haddress','$hcity',' $hstate','$hcountry','$hemail','$utype') this is an insert statement that works fine in the console, but not from a web document, I can update, and remove rows just fine using either method. Can anybody see a problem with this statement, I fear I have been staring and cursing at it too long to discover a problem on my own! I'm not sure if it matters here or not but I'm using win32, PHP4 and the latest mySQL binary distro. Thank you in advance (C: _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 3.23.43 Binary Distribution not stable on Domain Socket 1000 threads
We've just switched from compiling our own MySQL to using your binary distribution. This is the first time we've run MySQL in production from one of your binary builds. We had to switch to a binary distribution because we were running into the 1000 threads issue with the GLIBC library we were linking against. We've now had the server running for about a week and we've just run into a little problem which seems like it's a bug in the mysql and mysqladmin client, or a problem with the mysqld server. We currently have ~1117 clients connected to our production database, all of these connections are TCP/IP based connections, none of them are on the local domainsocket on the db server. Our DB server was taking a pounding, so I logged into the db server, and connected as root and tried to list the connected processes: --- db-01:~ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 49923 to server version: 3.23.43-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show processlist; ERROR 2013: Lost connection to MySQL server during query --- Ooops! The thread died! Tried again, doesn't work, tried mysqladmin -u root -p processlist, same deal! Crashed thread! Nothing appears in the mysql error log.. I tried running some queries on one of our databases from the db server using the mysql client. If I do a select * on a table with only a few rows (seems like less then 100), the query goes through fine. If I do it on a table with more then like 100 rows, the thread crashes: mysql select * from Course; [.] 74 rows in set (0.00 sec) mysql select * from Section; ERROR 2013: Lost connection to MySQL server during query mysql select count(*) from Section; ERROR 2006: MySQL server has gone away No connection. Trying to reconnect... Connection id:49927 Current database: TT_fcgi +--+ | count(*) | +--+ | 318 | +--+ 1 row in set (0.11 sec) mysql Is there something horrifically wrong with mysql when it goes over 1000 connections or something? I swear I was able to do show processlist from the db server yesterday (but we had less then 1000 connections yesterday). I *am* able to a process list if I connect through TCP/IP: db-01:~ mysql -u joe -h 127.0.0.1 -p So it looks like it just effects the domain socket connections, and TCP/IP is okay. Fortunaetly all of our apps use TCP/IP, so it's not a big deal to us. But I bet somebody out there -does- care! :) The threads crashing seems to compeltely uneffect any of our TCP/IP connections running queries at the same time. Thanks, -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
What are MYSQL_RES limits ?
I seem to be hitting a ceiling in MYSQL_RES (mysql_use_result). I select 2 or 3 items but only 2295 are returned. What might be the cause of this? Thanks, -- , M A R I O data miner, LIACC, room 221 tel 351+226078830, ext 121 A M A D O Rua Campo Alegre, 823 fax 351+226003654 A L V E S P-4150 PORTO, Portugalmob 351+939354002 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: installing mysql 3.23.43 - unrecognized option
At 10:32 AM -0500 10/30/01, Douglas B. Jones wrote: Hi, My /etc/my.cnf has the 'password' line commented out. Also, according to the instructions, that files is not copied over yet at the time one does the db install command: mysql_install_db. Any ideas? It may be in another configuration file. Locate the mysqld binary and run it directly like this: mysqld --help Then look in the output for something that looks like this: Default options are read from the following files in the given order: /etc/my.cnf /usr/local/mysql/var/my.cnf ~/.my.cnf The following groups are read: mysqld server The following options may be given as the first argument: --print-defaultsPrint the program argument list and exit --no-defaults Don't read default options from any options file --defaults-file=# Only read default options from the given file # --defaults-extra-file=# Read this file after the global files are read Note the pathnames of the option files and check the contents of those listed (at least those that actually exist on your system). Thanks, Cheers, Douglas p.s.: I copied Sinisa on this since he also came up with the same idea. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Connection problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 check mysql.user, you probably have permission for franck@localhost, which succeeds when you omit the -h, but no permission for [EMAIL PROTECTED], so you fail when you specify that is where you are coming from. John Barton [EMAIL PROTECTED] http://jbarton.technicalworks.net On Tue, 30 Oct 2001, COLLINEAU Franck FTRD/DMI/TAM wrote: Hi! When i type: mysql -u franck -p then my password, it's ok. My machine's name is r-lx-collineau When i type mysql - h r-lx-collineau -u franck -p then my password, i have this message: ERROR 1130: host 'r-lx-collineau' is not allowed to connect to this MySQL server Can anybody help me ? Franck - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE73u4tFllLbUnOIMARAioTAJoDH4Av4CtM54YAXX/gFlycDi34VgCdHohi OHy/88V+xUTrBMeJRtLqe5k= =l46z -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
Perl Module Help
Trying to get the benchmark 3.23.43 installed but it says I need MYSQL-DBI-perl-bin which I can't seem to locate. Looked at cpan.org and there was no module named that. I found plenty of modules when I did a search on mysql, but nothing named specifically that, so I'm confused on what to get. Anyone know which module I need that includes MYSQL-DBI-perl-bin? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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_FORMAT=compressed has no effect on db file sizes
In the last episode (Oct 30), Bennett Haselton said: I created one table with the command: CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE, id INT UNSIGNED NOT NULL); and another one with the command: CREATE TABLE pet2 (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE, id INT UNSIGNED NOT NULL) ROW_FORMAT=compressed; From the manual: :`ROW_FORMAT' Defines how the rows should be stored. Currently : this option only works with MyISAM tables, which : supports the `DYNAMIC' and `FIXED' row formats. : *Note MyISAM table formats::. :When you `CREATE' or `ALTER' a table you can for tables that :doesn't have `BLOB''s force the table format to `DYNAMIC' or :`FIXED' with the `ROW_FORMAT=#' table option. In the future you :will be able to compress/decompress tables by specifying :`ROW_FORMAT=compressed | default' to `ALTER TABLE'. *Note CREATE :TABLE::. -- Dan Nelson [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
BUG: Need option to disable tty check in mysql client
Please treat this as a fairly urgent problem. It's simple to fix, but the effects of the bug are a severe loss of functionality under Win32. Several options in the mysql client (--batch, --silent, etc.) have no corresponding options to reverse that behavior (e.g. --no-batch, --no-silent, etc.), which is generally accepted option style. Compounded with this is the fact that the mysql client does a check on isatty(0) and isatty(1), and if it fails this check, it automatically forces the client into batch, silent, quit-on-error mode. Two things need to be done: (a) There needs to be an option to disable the TTY check in the client. This is most important when running mysql under Emacs (using sql-mysql) on non-Unix platforms (which don't have pseudo-ttys). How about --assume-tty? (b) Also, the check of isatty(0), etc., should be done *AFTER* the option checks, not before, and should be disabled if the option above is set. Finally, as a matter of style, (c) Options like --batch, --silent, etc., that toggle boolean states, all need to have opposite options of the form --no-batch, --no-silent, etc. It's enough to implement these as long-form-only. These changes are actually fairly trivial to implement, and I would have been glad to submit a patch for this, except that the Win32 port of MySQL needs Visual C++ to compile, which I don't have access to. Thanks much in advance, -- Shankar Unni. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Ordering Semi-Numeric ???
The difficulty you're having is that what you call alphanumeric, MySQL sees as just a string. How about a computed field with some usage of MySQL's substring_index function to parse the string into pieces, if you know they will always have the given delimiter (the -, in your example), and then sort based on just the numeric piece? For example, with what you provided, this should work: SUBSTRING_INDEX((SUBSTRING_INDEX(colname,'-',2)), '-', -1) as the inner substring_index returns XY-1, XY-2, ... XY-n, while the outer substring_index call returns just 1, 2, ... n. This has the advantage of not caring how large your numeric values are, nor what characters or length of characters are before or after the substring in question. Hope this helps. Chris Aitken [EMAIL PROTECTED] 10/29/01 09:31PM Hi All, Ive been searching the archives and the documentation but dont really know the terminology im looking for, or even if its do-able or not so I figure I would just ask here instead.. I have a list of records in a table, and one of the fields is alpha numeric. They look like this... XY-1-BLAH XY-2-BLAH XY-3-BLAH XY-4-BLAH XY-5-BLAH XY-6-BLAH XY-7-BLAH XY-8-BLAH XY-9-BLAH XY-10-BLAH XY-11-BLAH XY-12-BLAH XY-13-BLAH Now whats happening, im sorting my query by this field and I want it to sort as it is above. however its putting it as the following order XY-1-BLAH XY-10-BLAH XY-11-BLAH XY-12-BLAH XY-13-BLAH XY-2-BLAH XY-3-BLAH Is there a way to sort this field (which is set to VARCHAR) by the first list, not the second list ? I know I can load all the entries up in an array and use a PHP type array sort function, but thats not really the outcome I need because ultimately I want to do a descending sort, and just grab the last record.. Am I making sense, cause ive managed to confuse myself a little here :) Cheers Chris -- Chris Aitken - Administration/Database Designer - IDEAL Internet email: [EMAIL PROTECTED] phone: +61 2 4628 fax: +61 2 4628 8890 __-__ # ln -s /dev/null /bin/laden If you don't like my typing, all flames to /bin/laden - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
BUG: Need option in client to disable TTY check (and other anti-options)
Please treat this as a fairly urgent problem. It's simple to fix, but the effects of the bug are a severe loss of functionality under Win32. Several options in the mysql client (--batch, --silent, etc.) have no corresponding options to reverse that behavior (e.g. --no-batch, --no-silent, etc.), which is generally accepted option style. Compounded with this is the fact that the mysql client does a check on isatty(0) and isatty(1), and if it fails this check, it automatically forces the client into batch, silent, quit-on-error mode. Two things need to be done: (a) There needs to be an option to disable the TTY check in the client. This is most important when running mysql under Emacs (using sql-mysql) on non-Unix platforms (which don't have pseudo-ttys). How about --assume-tty? (b) Also, the check of isatty(0), etc., should be done *AFTER* the option checks, not before, and should be disabled if the option above is set. Finally, as a matter of style, (c) Options like --batch, --silent, etc., that toggle boolean states, all need to have opposite options of the form --no-batch, --no-silent, etc. It's enough to implement these as long-form-only. These changes are actually fairly trivial to implement, and I would have been glad to submit a patch for this, except that the Win32 port of MySQL needs Visual C++ to compile, which I don't have access to. Thanks much in advance, -- Shankar Unni. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Can't set max_connections on debian version
I realize this is not the current version, but debian stable is stuck on: 3.22.32. mysqld does not start when I enter max_connections 200 although it reports max_connections 100 Sincerely, William Mussatto, Senior Systems Engineer CyberStrategies, Inc ph. 909-920-9154 ext. 27 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Can you use a Unix MySql db file on Windows?
I was wondering if there is a way to download the MySql database hosted on a UNix machine running Solaris, to my Windows computer and be able to view and modify it from there? The Solaris version has .ISD and .ISM files wheras Windows has .MYD and .MYI files. Any help would be greatly appreciated. Thanks _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
What are MYSQL_RES limits ? -- update
On Tue, 30 Oct 2001, M. A. Alves wrote: I seem to be hitting a ceiling in MYSQL_RES (mysql_use_result). I select 2 or 3 items but only 2295 are returned. What might be the cause of this? The probable cause is I was accessing the same table at the same time (but thru different connections). However I am surprise MySQL cannot cope with this kind of concurrent access. Or can it? One access was selection and the other was updating. Thanks a lot, -- , M A R I O data miner, LIACC, room 221 tel 351+226078830, ext 121 A M A D O Rua Campo Alegre, 823 fax 351+226003654 A L V E S P-4150 PORTO, Portugalmob 351+939354002 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 you use a Unix MySql db file on Windows?
Humm Well could you make your unix box master and you microsoft box slave? So letting one update the other..??? Or just run CDE? Simon -Original Message- From: Ryan Winterbourne [mailto:[EMAIL PROTECTED]] Sent: 30 October 2001 18:59 To: [EMAIL PROTECTED] Subject: Can you use a Unix MySql db file on Windows? I was wondering if there is a way to download the MySql database hosted on a UNix machine running Solaris, to my Windows computer and be able to view and modify it from there? The Solaris version has .ISD and .ISM files wheras Windows has .MYD and .MYI files. Any help would be greatly appreciated. Thanks _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Perl Module Help
From: Patrick Nelson [EMAIL PROTECTED] Trying to get the benchmark 3.23.43 installed but it says I need MYSQL-DBI-perl-bin which I can't seem to locate. Hmm, I couldn't find that either. Can you tell me where you've found benchmark, I'll have a look at it and see if I can answer your question. --- Rodney Broom Programmer: Desert.Net - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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't set max_connections on debian version
Thanks but it doesn't work... Below is the extract of the configuration file it does not matter whether I include spaces around the = or not, starting using mysql_safe results in a failed There is no entry in the error log. Commenting out the line results in a successful restart. I am probably missing something basic but... On 30 Oct 2001, Tonu Samuel wrote: Date: 30 Oct 2001 21:21:32 +0200 From: Tonu Samuel [EMAIL PROTECTED] To: William R. Mussatto [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Can't set max_connections on debian version On Tue, 2001-10-30 at 20:53, William R. Mussatto wrote: I realize this is not the current version, but debian stable is stuck on: 3.22.32. mysqld does not start when I enter max_connections 200 although it reports max_connections 100 Where you enter it? Should be max_connections=200 in my.cnf file. And yes, upgrade if you can :) # This will be passed to all mysql clients [client] #password = my_password port= 3306 socket = /var/run/mysqld/mysqld.sock [mysqld] user= mysql pid-file= /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port= 3306 log = /var/log/mysql.log basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language= /usr/share/mysql/english skip-locking set-variable= key_buffer=16M set-variable= max_allowed_packet=1M set-variable= thread_stack=128K max_connections = 200 [mysqldump] quick set-variable= max_allowed_packet=1M [mysql] no-auto-rehash [isamchk] set-variable= key_buffer=16M Sincerely, William Mussatto, Senior Systems Engineer CyberStrategies, Inc ph. 909-920-9154 ext. 27 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Index problem (I think) with MySQL 3.23.36 on Solaris
Hi all, mysqld seems to 'hang' under certain circumstances when I'm doing a fairly large ALTER TABLE -- adding or dropping an Index, repair etc. The server and client are still 'alive' and I can do simple things like show processlist, or selecting a count(0) from another table, but other selects or updates of other tables just sit there forever in the process list. mysqld's server usage goes up to over 99%, and the files for the table being ALTERed (in the data directory) are no longer being updated -- the size, last modified time, etc, do not change. It seems that if I issue just the ALTER TABLE statement, and then don't try to do ANYTHING else, it'll complete successfully (eventually), but if I issue ANY other select/update statement on another table, the CPU goes up to 99% and everything just stops. I'm running MySQL v.3.23.36 binary on an UltraSparc 1 with Solaris 8 (patched to 2001/04 IIRC). Any hints, ideas, suggestions? Any additional info I can provide? Thanks much, everyone. I'll summarize. Best, /Rob ~ Robert Alexander~~ Programmer/Analyst/DBA/Admin WWW Database Applications~~http://www.ra1.net Web Software and Hosting ~~ http://www.workmate.ca - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: bad practice to have a primary key field whose value changes?
Use a join query, rather than separate single-table queries: SELECT a.*, n.url FROM articles a, news_sites n WHERE a.news_site_key = n.news_site_key; -- Greg Johnson -Original Message- From: Bennett Haselton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 3:11 PM To: [EMAIL PROTECTED] Subject:bad practice to have a primary key field whose value changes? I'm creating a database where one of the tables stores data about news Web sites, and I'm using the URL of the site as a primary key field. This field value might change occasionally. I'm wondering if this is bad practice, especially since foreign keys in other tables might point to the news site table. MySQL doesn't enforce referential integrity, so if I change the URL of a particular site, then another table in the database might have a reference to a row that no longer exists. So I assume the right way to do this would be to use an auto-incremented number as the primary key field, and then have other tables refer to that as their foreign key. My problem with this is that I like to be able to dump the contents of the table and see something meaningful without having to refer to other tables. Say I have an articles table in the database, and one of the fields is a foreign key referring to the news site in the news sites table where the article was found. If I dump the contents of the articles table, all that I'll see is a number; then I have to go look in the news sites table to find out which actual site that number corresponds to. From this point of view, it's a lot easier just to use the news site URL as the key field in the news sites table -- then that's what can be used as the foreign key in the articles table. What would be ideal would be to use auto-incremented numeric fields as primary key fields, and then have a special field in each table designated as the user-friendly field. That way, when you want to view the contents of a table, the table viewing algorithm can take each field marked as a foreign key, go to that table, look up the user-friendly string for that row, and display that instead. This would satisfy the requirements in both paragraphs above. Is there already a way to do this, and if not, which of the two options above do people usually use? -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: 3.23.43 fails merge test ON make test of src.
Hi! R == R Talbot [EMAIL PROTECTED] writes: cut The following configuure line should have a big likehood to work: rm config.cache CC=gcc CFLAGS=-O3 CXX=gcc CXXFLAGS=-O3 -felide-constructors -fno-exceptions -fno-rtti ./configure --prefix=/usr/local/mysql --with-low-memory Regards, Monty R Monty R This is a second message today, one was before and now after compile. R I followed your instructions including all switches you had asked me R to set on configure. R The source of both v 3.23.40 and v 3.23.43 configured, compiled and R installed without a single error message. I did this on two different R machines, both with the same Caldera Linux OS installed 2.4 . The laptop R is a lowly 166mhz with 80 meg mem. The desktop was a 400mhz Cyrix R with 196 meg mem. R However both installs failed the same mysql-test-run tests R merge.replace... and rpl16 there were also some failure R that did not apply such as innodb.. bdb gemminiraid etc... R Note it does start and run and seems to perform well except for failed R items. Merge would come in handy. What is rpl00016 cut Any change you could give us a login on the desktop machine so that someone from us could login and test this ? MySQL should work on Caldera without any problems; If not, we would like to know why so that we can fix it! Regards, Monty - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: web-based interface for manipulating MySQL tables?
But PhpMyAdmin only use php3 At 12:39 p.m. 30-10-01 -0300, Ing. Gustavo Edelstein wrote: If you have PHP installed, try phpMyAdmin. It's a very good tool, easy use and installing. Regards. Ing. Gustavo A. Edelstein Tech. Mgr. Equiplus Argentina S.A. __ Visit us On Line at www.equiplus.com Email addresses: Operations: [EMAIL PROTECTED] Consulting: [EMAIL PROTECTED] Technical: [EMAIL PROTECTED] Web related: [EMAIL PROTECTED] General: [EMAIL PROTECTED] - Original Message - From: Bennett Haselton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 11:16 AM Subject: web-based interface for manipulating MySQL tables? Is there any pre-written code that allows users, authenticated over the Web, to view MySQL tables in their database as HTML tables? Desirable features for something like that would include: - tables are displayed in row-and-column format, with a few blank rows at the bottom where you can fill in new values and click to add them to the database (assuming that the user viewing the table has the appropriate rights) - values that represent foreign keys are hyperlinked, so that when you click on them, you're taken to the appropriate row in the other table etc. -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Saludos. Gonzalo Valenzuela S. Teléfono: 562 2451248 Móvil: 09 4892052 http://www.vianet.cl - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: web-based interface for manipulating MySQL tables?
I use phpmyadmin on a system with PHP4 -Original Message- From: Gonzalo Valenzuela [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 2:39 PM To: Ing. Gustavo Edelstein; [EMAIL PROTECTED]; Bennett Haselton Subject: Re: web-based interface for manipulating MySQL tables? But PhpMyAdmin only use php3 At 12:39 p.m. 30-10-01 -0300, Ing. Gustavo Edelstein wrote: If you have PHP installed, try phpMyAdmin. It's a very good tool, easy use and installing. Regards. Ing. Gustavo A. Edelstein Tech. Mgr. Equiplus Argentina S.A. __ Visit us On Line at www.equiplus.com Email addresses: Operations: [EMAIL PROTECTED] Consulting: [EMAIL PROTECTED] Technical: [EMAIL PROTECTED] Web related: [EMAIL PROTECTED] General: [EMAIL PROTECTED] - Original Message - From: Bennett Haselton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 11:16 AM Subject: web-based interface for manipulating MySQL tables? Is there any pre-written code that allows users, authenticated over the Web, to view MySQL tables in their database as HTML tables? Desirable features for something like that would include: - tables are displayed in row-and-column format, with a few blank rows at the bottom where you can fill in new values and click to add them to the database (assuming that the user viewing the table has the appropriate rights) - values that represent foreign keys are hyperlinked, so that when you click on them, you're taken to the appropriate row in the other table etc. -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Saludos. Gonzalo Valenzuela S. Teléfono: 562 2451248 Móvil: 09 4892052 http://www.vianet.cl - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
PHP/MySQL Problem
Does anyone see anything wrong with the following code/query syntax? I'm using the PEAR DB class for PHP. When this runs, it correctly inserts the row to the table, but is failing to retrieve the last_insert_id(). function StartOrder() { global $dbhandle; global $OrderID; global $CustomerID; if (!($OrderID)) { $query = INSERT INTO Orders (CustomerID) VALUES(; if ($CustomerID) { $query .= \ . $CustomerID . \; } else { $query .= \ . \; } $query .= ); $dbhandle-query(LOCK TABLES Orders WRITE); $dbhandle-query($query); $res = $dbhandle-query(select last_insert_id()); $dbhandle-query(UNLOCK TABLES); $result = $res-fetchRow(); return $OrderID = $result[0]; } else { return $OrderID; } } // end func -- Matthew Walker Ecommerce Project Manager Mountain Top Herbs --- -- Matthew Walker Ecommerce Project Manager Mountain Top Herbs --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.286 / Virus Database: 152 - Release Date: 10/9/2001 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: web-based interface for manipulating MySQL tables?
where I can find it? for php4? Thanks At 02:53 p.m. 30-10-01 -0600, Todd Williamsen wrote: No PHPadmin has two versions PHP3 and PHP Thank you, Todd Williamsen, MCSE home: 847.265.4692 Cell: 847.867.9427 -Original Message- From: Gonzalo Valenzuela [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 2:39 PM To: Ing. Gustavo Edelstein; [EMAIL PROTECTED]; Bennett Haselton Subject: Re: web-based interface for manipulating MySQL tables? But PhpMyAdmin only use php3 At 12:39 p.m. 30-10-01 -0300, Ing. Gustavo Edelstein wrote: If you have PHP installed, try phpMyAdmin. It's a very good tool, easy use and installing. Regards. Ing. Gustavo A. Edelstein Tech. Mgr. Equiplus Argentina S.A. __ Visit us On Line at www.equiplus.com Email addresses: Operations: [EMAIL PROTECTED] Consulting: [EMAIL PROTECTED] Technical: [EMAIL PROTECTED] Web related: [EMAIL PROTECTED] General: [EMAIL PROTECTED] - Original Message - From: Bennett Haselton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 11:16 AM Subject: web-based interface for manipulating MySQL tables? Is there any pre-written code that allows users, authenticated over the Web, to view MySQL tables in their database as HTML tables? Desirable features for something like that would include: - tables are displayed in row-and-column format, with a few blank rows at the bottom where you can fill in new values and click to add them to the database (assuming that the user viewing the table has the appropriate rights) - values that represent foreign keys are hyperlinked, so that when you click on them, you're taken to the appropriate row in the other table etc. -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Saludos. Gonzalo Valenzuela S. Teléfono: 562 2451248 Móvil: 09 4892052 http://www.vianet.cl - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php Saludos. Gonzalo Valenzuela S. Teléfono: 562 2451248 Móvil: 09 4892052 http://www.vianet.cl - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Index problem (I think) with MySQL 3.23.36 on Solaris -- hang
Responding to my own email... sheesh. It's just that kinda day. : I found reference in the archives to what seems to be the same problem. Monty replied to a thread entitled I got it hanged ! on 2001-07-17, and agreed that it shouldn't be happening. Unfortunately, I can't find a solution in the archives. I've had to shutdown mysqld. mysqladmin -p shutdown prevents the client from connecting, but the process still shows up with ps -ef | grep mysql. I eventually had to issue a kill -9 finally to remove it. Think I'm gonna install 4.0, but I'm still interested in a solution to this problem. Thanks all, /Rob At 15:05 -0500 2001/10/30, Robert Alexander wrote: Hi all, mysqld seems to 'hang' under certain circumstances when I'm doing a fairly large ALTER TABLE -- adding or dropping an Index, repair etc. The server and client are still 'alive' and I can do simple things like show processlist, or selecting a count(0) from another table, but other selects or updates of other tables just sit there forever in the process list. mysqld's server usage goes up to over 99%, and the files for the table being ALTERed (in the data directory) are no longer being updated -- the size, last modified time, etc, do not change. It seems that if I issue just the ALTER TABLE statement, and then don't try to do ANYTHING else, it'll complete successfully (eventually), but if I issue ANY other select/update statement on another table, the CPU goes up to 99% and everything just stops. I'm running MySQL v.3.23.36 binary on an UltraSparc 1 with Solaris 8 (patched to 2001/04 IIRC). Any hints, ideas, suggestions? Any additional info I can provide? Thanks much, everyone. I'll summarize. Best, /Rob - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: web-based interface for manipulating MySQL tables?
ok, ok, ok. thanks... At 02:53 p.m. 30-10-01 -0600, Todd Williamsen wrote: No PHPadmin has two versions PHP3 and PHP Thank you, Todd Williamsen, MCSE home: 847.265.4692 Cell: 847.867.9427 -Original Message- From: Gonzalo Valenzuela [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 2:39 PM To: Ing. Gustavo Edelstein; [EMAIL PROTECTED]; Bennett Haselton Subject: Re: web-based interface for manipulating MySQL tables? But PhpMyAdmin only use php3 At 12:39 p.m. 30-10-01 -0300, Ing. Gustavo Edelstein wrote: If you have PHP installed, try phpMyAdmin. It's a very good tool, easy use and installing. Regards. Ing. Gustavo A. Edelstein Tech. Mgr. Equiplus Argentina S.A. __ Visit us On Line at www.equiplus.com Email addresses: Operations: [EMAIL PROTECTED] Consulting: [EMAIL PROTECTED] Technical: [EMAIL PROTECTED] Web related: [EMAIL PROTECTED] General: [EMAIL PROTECTED] - Original Message - From: Bennett Haselton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 11:16 AM Subject: web-based interface for manipulating MySQL tables? Is there any pre-written code that allows users, authenticated over the Web, to view MySQL tables in their database as HTML tables? Desirable features for something like that would include: - tables are displayed in row-and-column format, with a few blank rows at the bottom where you can fill in new values and click to add them to the database (assuming that the user viewing the table has the appropriate rights) - values that represent foreign keys are hyperlinked, so that when you click on them, you're taken to the appropriate row in the other table etc. -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Saludos. Gonzalo Valenzuela S. Teléfono: 562 2451248 Móvil: 09 4892052 http://www.vianet.cl - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Saludos. Gonzalo Valenzuela S. Teléfono: 562 2451248 Móvil: 09 4892052 http://www.vianet.cl - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: PHP/MySQL Problem
That won't work. The connection is being made through the PEAR DB class, so the standard PHP functions won't work. (And yes, I did just test it.) -Original Message- From: rc [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 1:58 PM To: Matthew Walker Cc: [EMAIL PROTECTED] Subject: Re: PHP/MySQL Problem Mysql_Insert_ID($dbhandle-connection); gets the last id of the last insert statement - if you do any db activity after the insert, this won't work. On Tue, 30 Oct 2001, Matthew Walker wrote: Does anyone see anything wrong with the following code/query syntax? I'm using the PEAR DB class for PHP. When this runs, it correctly inserts the row to the table, but is failing to retrieve the last_insert_id(). function StartOrder() { global $dbhandle; global $OrderID; global $CustomerID; if (!($OrderID)) { $query = INSERT INTO Orders (CustomerID) VALUES(; if ($CustomerID) { $query .= \ . $CustomerID . \; } else { $query .= \ . \; } $query .= ); $dbhandle-query(LOCK TABLES Orders WRITE); $dbhandle-query($query); $res = $dbhandle-query(select last_insert_id()); $dbhandle-query(UNLOCK TABLES); $result = $res-fetchRow(); return $OrderID = $result[0]; } else { return $OrderID; } } // end func -- Matthew Walker Ecommerce Project Manager Mountain Top Herbs --- -- Matthew Walker Ecommerce Project Manager Mountain Top Herbs --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.286 / Virus Database: 152 - Release Date: 10/9/2001 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.286 / Virus Database: 152 - Release Date: 10/9/2001 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: JDBC: Losing precision when mapping doubles from Java
Hello, I'm losing precision when I send a double to a mysql database from a Java program trough JDBC. Code: stmt.setDouble(i+3,((Double)value).doubleValue()); Ok, the problem was solved after I updated my MM.MySQL driver to the newest version. Here you can get it: http://www.thenetsquad.com/services/jdbcsupport.html Roland - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: PHP/MySQL Problem
here's my code that is working perfectly $Conn is the connection object $sql = INSERT INTO dp_survey_question (survey_id,question_type_id,question_text) VALUES ( . $s_id . , . $qt_id . , . $Conn-quote($q_text) . ); $result = $Conn-query($sql); if (DB::isError($result)) { die( $result-getMessage().br.$sql ); } $q_id = Mysql_Insert_ID($Conn-connection); On Tue, 30 Oct 2001, Matthew Walker wrote: That won't work. The connection is being made through the PEAR DB class, so the standard PHP functions won't work. (And yes, I did just test it.) -Original Message- From: rc [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 1:58 PM To: Matthew Walker Cc: [EMAIL PROTECTED] Subject: Re: PHP/MySQL Problem Mysql_Insert_ID($dbhandle-connection); gets the last id of the last insert statement - if you do any db activity after the insert, this won't work. On Tue, 30 Oct 2001, Matthew Walker wrote: Does anyone see anything wrong with the following code/query syntax? I'm using the PEAR DB class for PHP. When this runs, it correctly inserts the row to the table, but is failing to retrieve the last_insert_id(). function StartOrder() { global $dbhandle; global $OrderID; global $CustomerID; if (!($OrderID)) { $query = INSERT INTO Orders (CustomerID) VALUES(; if ($CustomerID) { $query .= \ . $CustomerID . \; } else { $query .= \ . \; } $query .= ); $dbhandle-query(LOCK TABLES Orders WRITE); $dbhandle-query($query); $res = $dbhandle-query(select last_insert_id()); $dbhandle-query(UNLOCK TABLES); $result = $res-fetchRow(); return $OrderID = $result[0]; } else { return $OrderID; } } // end func -- Matthew Walker Ecommerce Project Manager Mountain Top Herbs --- -- Matthew Walker Ecommerce Project Manager Mountain Top Herbs --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.286 / Virus Database: 152 - Release Date: 10/9/2001 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.286 / Virus Database: 152 - Release Date: 10/9/2001 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
installations
I'm looking for instructions on installing the mysql GUI interface on a unix system. Is that possible? Thank you, Nathan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: bad practice to have a primary key field whose value changes?
On Tue, 2001-10-30 at 13:10, Bennett Haselton wrote: I'm creating a database where one of the tables stores data about news Web sites, and I'm using the URL of the site as a primary key field. This field value might change occasionally. I'm wondering if this is bad practice, especially since foreign keys in other tables might point to the news site table. MySQL doesn't enforce referential integrity, so if I change the URL of a particular site, then another table in the database might have a reference to a row that no longer exists. The latest version of the InnoDB handler enforces referential integrity. So I assume the right way to do this would be to use an auto-incremented number as the primary key field, and then have other tables refer to that as their foreign key. My problem with this is that I like to be able to dump the contents of the table and see something meaningful without having to refer to other tables. Say I have an articles table in the database, and one of the fields is a foreign key referring to the news site in the news sites table where the article was found. If I dump the contents of the articles table, all that I'll see is a number; then I have to go look in the news sites table to find out which actual site that number corresponds to. From this point of view, it's a lot easier just to use the news site URL as the key field in the news sites table -- then that's what can be used as the foreign key in the articles table. There are other reasons to use an auto-increment field. For one, indexes on integers are faster and much more efficient than indexes on strings. Another alternative to auto-incremented fields would be to use a hash of the url as the primary key. Then you can effectively look up based on the url, while using a numerical index for speed and efficiency. That would not solve the foreign key problem though. What would be ideal would be to use auto-incremented numeric fields as primary key fields, and then have a special field in each table designated as the user-friendly field. That way, when you want to view the contents of a table, the table viewing algorithm can take each field marked as a foreign key, go to that table, look up the user-friendly string for that row, and display that instead. This would satisfy the requirements in both paragraphs above. Is there already a way to do this, and if not, which of the two options above do people usually use? -Bennett Generally people do not put user-friendly fields in tables. That's what joins are for :) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 turn beeping off
Does anyone know how to turn that annoying beeping off in the text mode utilities such as mysql.exe? Ben Pracht - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: PHP/MySQL Problem
On 30-Oct-2001 Matthew Walker wrote: Does anyone see anything wrong with the following code/query syntax? I'm using the PEAR DB class for PHP. When this runs, it correctly inserts the row to the table, but is failing to retrieve the last_insert_id(). function StartOrder() { global $dbhandle; global $OrderID; global $CustomerID; if (!($OrderID)) { $query = INSERT INTO Orders (CustomerID) VALUES(; if ($CustomerID) { $query .= \ . $CustomerID . \; } else { $query .= \ . \; } $query .= ); $dbhandle-query(LOCK TABLES Orders WRITE); $dbhandle-query($query); $res = $dbhandle-query(select last_insert_id()); $dbhandle-query(UNLOCK TABLES); $result = $res-fetchRow(); UNLOCK TABLES is prolly trashing the result set; try swaping these two lines. return $OrderID = $result[0]; } else { return $OrderID; } } // end func Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 help...
David, First of all, please post to the list in the future. I'm not always available to help with problems, and others may benefit from the problem/solution. I would change your query to the following: SELECT DISTINCT a.addrdsp,a.listdate,a.solddate,a.lpricea,a.sprice FROM archive a, archive b WHERE a.status='s' AND a.addrdsp IS NOT NULL AND a.addrdsp = b.addrdsp AND a.solddate b.solddate AND date_add(a.solddate, interval 1 year) b.solddate ORDER BY a.addrdsp, a.solddate LIMIT 200; There are other ways to do it, but really none of them are all that pretty :) On Tue, 2001-10-30 at 12:27, David Wolf wrote: Steve, I have one other (more complex) query I need some help on.. And you were great help in the first query I did. I have a database with ~300,000 rows. I want to find all properties that have been sold more than once within a x month period (say, 12). I've tried: SELECT DISTINCT a.addrdsp,a.listdate,a.solddate,a.lpricea,a.sprice FROM archive a, archive b WHERE a.status='s' AND a.addrdsp IS NOT NULL AND a.addrdsp = b.addrdsp AND a.solddate !=b.solddate AND year(a.solddate) = year(b.solddate) --- This is obviously a bad query line ORDER BY a.addrdsp, a.solddate LIMIT 200; I can get it to work 'sort-of' It doesn't show properties where there are more than 1 sale, and it doesn't (obviously) work where the two sold-dates are with 12 months of each other. Can you help? Thanks in advance, David - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Can field names be longer than ONE word?
As subject what do I do if I want a field called (for example) Competition ID? I have looked (http://www.mysql.com/doc/C/R/CREATE_TABLE.html) but to no avail. I have tried enclosing it in quotes and 'single quotes' but neither work. Can this be done? Thanks lots David Ayliffe ICQ# 125646758 For the filter: MySQL, Table, Database - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 turn beeping off
At 4:34 PM -0500 10/30/01, Benjamin J Pracht wrote: Does anyone know how to turn that annoying beeping off in the text mode utilities such as mysql.exe? Ben Pracht I don't believe mysql.exe has ever beeped at me. What are you doing when it beeps at you? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Strange results from query
I'm using the following query SELECT DISTINCT a.addrdsp,a.listdate,a.solddate,a.lpricea,a.sprice FROM archive a, archive b WHERE a.status='s' AND a.addrdsp IS NOT NULL AND a.addrdsp = b.addrdsp AND a.solddate b.solddate AND date_add(a.solddate, interval 1 year) b.solddate ORDER BY a.addrdsp, a.solddate LIMIT 200; I'm trying to look at about 300,000 rows of property data. I'm interested in knowing which properties have been sold 2 or more times within a 1 year period. However, when I run the query, I get 100 Brazeau Cresc SW and 100 Bridlewood Road SW in my list of properties--even though they have not had 2 or more 'sales' within a period of one year. I need to limit those properties which only occur once in the table. Also, even though all of the fields are indexed, the query takes up to 12 minutes to complete! Thanks David - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 field names be longer than ONE word?
At 5:16 PM + 10/30/01, David Ayliffe wrote: As subject what do I do if I want a field called (for example) Competition ID? I have looked (http://www.mysql.com/doc/C/R/CREATE_TABLE.html) but to no avail. I have tried enclosing it in quotes and 'single quotes' but neither work. Can this be done? Check this section instead: http://www.mysql.com/doc/L/e/Legal_names.html You want to use back quotes (`Competition ID`). Thanks lots David Ayliffe ICQ# 125646758 For the filter: MySQL, Table, Database - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 field names be longer than ONE word?
Hello David! As subject what do I do if I want a field called (for example) Competition ID? I have looked (http://www.mysql.com/doc/C/R/CREATE_TABLE.html) but to no avail. I have tried enclosing it in quotes and 'single quotes' but neither work. Can this be done? Wrong doc. :) Try http://www.mysql.com/doc/L/e/Legal_names.html That says that with a few limitations 'any legal file name' under your OS is fine. But what does 'neither work' mean? Exactly what error do you see at what point in the process? Creating the table? Accessing the table? Do't just type in the error, use copy/paste. Just for fun, try quoting with `backtick.` That's mentioned related to 'special' chars and maybe space is such. Have a :) day! jb ob-filter-words: database sql -- jim barchuk [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: How to turn beeping off
Paul DuBois wrote: At 4:34 PM -0500 10/30/01, Benjamin J Pracht wrote: Does anyone know how to turn that annoying beeping off in the text mode utilities such as mysql.exe? I don't believe mysql.exe has ever beeped at me. What are you doing when it beeps at you? Whenever there's an error. Try mysql bogus.sql where bogus.sql has a syntax error. On Windows, this is excruciating, as it emits a 1-second beep for each error. (a PC-speaker console beep). -- Shankar. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Can field names be longer than ONE word?
As subject what do I do if I want a field called (for example) Competition ID? I have looked (http://www.mysql.com/doc/C/R/CREATE_TABLE.html) but to no avail. Section 6.1.2 is probably closer to what you need. I have tried enclosing it in quotes and 'single quotes' but neither work. Can this be done? Try using backticks (`) instead. AFAICT, this should work with MySQL. Using such a naming strategy will also have the added advantage of making your application almost impossible to port in the future... / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Strange results from query
I'm using the following query SELECT DISTINCT a.addrdsp,a.listdate,a.solddate,a.lpricea,a.sprice FROM archive a, archive b WHERE a.status='s' AND a.addrdsp IS NOT NULL AND a.addrdsp = b.addrdsp AND a.solddate b.solddate AND date_add(a.solddate, interval 1 year) b.solddate ORDER BY a.addrdsp, a.solddate LIMIT 200; I'm trying to look at about 300,000 rows of property data. I'm interested in knowing which properties have been sold 2 or more times within a 1 year period. However, when I run the query, I get 100 Brazeau Cresc SW and 100 Bridlewood Road SW in my list of properties--even though they have not had 2 or more 'sales' within a period of one year. I need to limit those properties which only occur once in the table. Shouldn't you require b.status to be 's' as well? Also, even though all of the fields are indexed, the query takes up to 12 minutes to complete! I'm not surprized -- you're forcing MySQL to calculate date_add on every single one of the 300,000 rows. Indexing doesn't help you there. / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: How to turn beeping off
Paul DuBois wrote: At 4:34 PM -0500 10/30/01, Benjamin J Pracht wrote: Does anyone know how to turn that annoying beeping off in the text mode utilities such as mysql.exe? I don't believe mysql.exe has ever beeped at me. What are you doing when it beeps at you? Whenever there's an error. Try mysql bogus.sql where bogus.sql has a syntax error. On Windows, this is excruciating, as it emits a 1-second beep for each error. (a PC-speaker console beep). -- Shankar. Huh. This never happens to me. My Windows box must be busted. :-) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 turn beeping off
At 4:34 PM -0500 10/30/01, Benjamin J Pracht wrote: Does anyone know how to turn that annoying beeping off in the text mode utilities such as mysql.exe? Ben Pracht I don't believe mysql.exe has ever beeped at me. What are you doing when it beeps at you? I figured out why I don't get the beep: I had the speaker turned off in the BIOS. I assume you don't want to do that? :-) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: installatin problem
Ken Abe writes: I am a student at NYU trying to install mysql on our department machines. The fact that I do not have root priviledges is probably part of the issue, but I followed the instructions regarding installation as a normal user. A bit further down I see that you're installing in /usr/local/mysql. Just to make sure: This directory exists and you have write access there, right? :-) When running the installation script mysql_install_db, everything seems fine. But when I try lauching the daemon with safe_mysqld is ends immediately. It could be due to the fact that I don't see a mysql.sock file in my /tmp directory, but I don't know how to create a socket. I guess you haven't read the FAQ yet. I can't blame you, as it's not easy to find unless you know that exists (in which case it's trivial to find). Anyway, mysql.sock is created by mysqld, and it's removed when the program exits. I suggest that you read the log file to find out what's going wrong. It should be in the data dir, and if it's not there the only explanation I can think of is that you don't have write access to the data dir, but since mysql_install_db worked, that shouldn't be the case. BTW, I've installed mysql at work w/o being root, and I didn't have any problems aside from having to add the location of the client shared lib to LD_LIBRARY_PATH for clients to work. //C - cursing because he forgot to change the to: address before hitting 'send' -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Module Help
From: Patrick Nelson [EMAIL PROTECTED] RH 6.2 with the following MySql stuff installed (by rpm) Unfortunately, I could only find 'bench' in RPM. Since that requires me to install the package (which I'm not willing to do without know what's going to happen), I can't continue. I appoligize. Please, let me know if you bump into a tarred source of this package. --- Rodney Broom Programmer: Desert.Net - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 turn beeping off
doesn't windows have some control panel that lets you turn sounds off and on for certain functions and/or events? On Tue, 30 Oct 2001, Paul DuBois wrote: Paul DuBois wrote: At 4:34 PM -0500 10/30/01, Benjamin J Pracht wrote: Does anyone know how to turn that annoying beeping off in the text mode utilities such as mysql.exe? I don't believe mysql.exe has ever beeped at me. What are you doing when it beeps at you? Whenever there's an error. Try mysql bogus.sql where bogus.sql has a syntax error. On Windows, this is excruciating, as it emits a 1-second beep for each error. (a PC-speaker console beep). -- Shankar. Huh. This never happens to me. My Windows box must be busted. :-) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: web-based interface for manipulating MySQL tables?
We used to use phpmyadmin, but moved on to mysqltool last January. You might want to check it out. http://dajoba.com/projects/mysqltool/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 turn beeping off
Back a few years there was a nasty little virus that played Chops on your WinDoDie box's and we had to unplug the PC Speakers on a couple dozen becuase there was not fix for it at the time. Or was it cause they where to cheap..hmm. Does anyone know how to turn that annoying beeping off in the text mode utilities such as mysql.exe? Cut the speaker cable. / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Upgrading to MyISAM table type
I don't believe that the table is corrupt, I'm more inclined to believe your zero theory. create table crashme (a int(10) not null auto_increment primary key) type=isam; insert into crashme set a=0; # actually inserts a = 1; update crashme set a=0 where a = 1; insert into crashme set a=0; # actually inserts a = 1; alter table crashme type=myisam; ERROR 1062 : Duplicate entry '1' for key 1 So, if you manage to set an autoincrement key to 0 in an ISAM table, alter table will always crash with a dupe key error. Before I saw your e-mail reply, which probably would have been simpler, I solved the problem by: Create a new table called job_new insert into job_new select fields_in_new_table_order from job; rename job to job_old rename job_new to job Perhaps alter table should be a bit more forgiving? Regards, Rich At 05:06 PM 10/30/01, Steve Meyers wrote: You might have a corrupt table. For 3.22 format, you'll need to use isamchk, I think... It's been a long time since I've worked with ISAM tables. Now that I look closer at your email, though, it is probably the fact that your id's start with 0, not 1. The alter table actually dumps the data into a new table. It may be inserting the 0 as a 1 (auto_increments tend to do that -- it can be annoying at times). Then the 1 fails because of the duplicate key. Seems rather silly for an alter table to do, though, so let me know what you find out. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 produces no results? - How to check ?
I have a perl script that selects users dial-up usage based on month/year - It works fine, but if the selected month/year does not contain any usage data, the only way I can check is with the following code: # $sth-execute() # Execute the query $my_result = $sth-execute() # Execute the query or die Couldn't execute statement: . $sth-errstr; if ($my_result eq 0E0){ print No data is available for the selected time period; exit(0); } # The select produced results - Read the matching records and print them out while (@data = $sth-fetchrow_array()) { The '0E0' came about by just printing the result of $my_result during successful/non-successful selects. I'm sure there is a more elegant way to check if a select statement results in success or not. Regards, Michael Debian Linux 2.2, mysql Ver 9.38 Distrib 3.22.32, for pc-linux-gnu (i686) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Having trouble using LIMIT
Hi, When I do the following in a perl script I get back all the records I want: $prep = SELECT id,name FROM go.objectives WHERE subjects_id='1' AND subjectHeadings_id='2' ORDER BY displayOrder; $sth = $dbh-prepare($prep); $sth-execute; But when I add in the LIMIT statement it returns no records $prep = SELECT id,name FROM go.objectives WHERE subjects_id='1' AND subjectHeadings_id='2' LIMIT 1,5 ORDER BY displayOrder; $sth = $dbh-prepare($prep); $sth-execute; Any idea why? MySQL table query M. -- Work:- postmasterAThinwick.demon.co.uk WEB:- http://www.hinwick.demon.co.uk Work:- mworsdallATshaftesburysoc.org.uk REPLACE AT with @ Home:- hinwickATworsdall.demon.co.ukWEB:- http://www.worsdall.demon.co.uk Shadow:- webmasterATshadow.org.uk WEB:- http://www.shadow.org.uk - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL data in user dirs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 How to I put a users MySQL data into thier home dir? I have tried moving thier database over and sym-linking it: mv /var/lib/mysql/userdb /home/user ln -s /home/user/userdb /var/lib/mysql/userdb But mysql doesnt see the database. I also tried to move and symlink the tables themselves: mkdir /home/user/userdb mv /var/lib/mysql/userdb/* /home/user/userdb/ ln /home/user/userdb/... /lib/mysql/userdb/... (a few times) And it works. What I am a trying to achieve is to have the user's MySQL data size restricted by thier quota. Any suggestions? -BEGIN PGP SIGNATURE- Version: PGP 7.1 iQA/AwUBO99PjMGemXVaU1CGEQJDmwCfRB/aK/jiX0nZWLAjhWAx9pkUK7AAn3Au IiJogSGR/oTeuANl2CcaJ85p =6vec -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: Having trouble using LIMIT
But when I add in the LIMIT statement it returns no records $prep = SELECT id,name FROM go.objectives WHERE subjects_id='1' AND subjectHeadings_id='2' LIMIT 1,5 ORDER BY displayOrder; $sth = $dbh-prepare($prep); $sth-execute; http://www.mysql.com/doc/S/E/SELECT.html The LIMIT goes after the ORDER BY. On a related note, maybe you should check for MySQL error codes when you run a query :) Steve Meyers - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: HOW do I return the results of a count to a variable
Have you tried using the $rows = $sth-rows() after you execute to get the total rows returned? On Wed, 31 Oct 2001 00:43:00 +, Mark Worsdall [EMAIL PROTECTED] wrote: Hi, I want to alter this statement so it returns the number of records. $prep = SELECT COUNT(*) FROM go.objectives WHERE subjects_id='1' AND subjectHeadings_id='2' ORDER BY displayOrder; $sth = $dbh-prepare($prep); $sth-execute; So what I need to do is add the COUNT statement into the above and then return the number of records but how? MySQL table query Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Tel: 1(225)686-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: MySQL data in user dirs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I dont have hard quota's, It is a script that looks at the userdir and tells them if they are over the limit, then if they are xMb over the limit the admin is notified. Yes, I could modify this script, but I would rather have all the user's data in thier homedir, as I have for thier apache conf, thier mail, their web data, thier ftp data, etc etc etc. - -Original Message- From: Mike Rogers [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 2:19 PM To: Nathan Ward Subject: Re: MySQL data in user dirs If you want your backends to crash when a user reaches their quota, that would be an amaizing idea. I doubt that is actually intended though. How about a simple script which will just look at the size of the database file, or look at the size of the data in the database [edit the new phpMyAdmin and see what query they use to find out the size of each database]. Make a cron job that every hour runs and gets the value, compares it to their quota and sends them an e-mail or notifies the admin to whine to them. Otherwise, you are creating havok for yourself. Besides- Disk space is cheap. Just pick up a 180GB [one hundred and eighty gigabytes] Seagate SCSI drive (10kRPM, U160) dirt cheap. Or even a few 9's or 18's. Or if you want to skimp, go IDE and get 100GB for 200$CDN. - -- Mike - - Original Message - From: Nathan Ward [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 9:10 PM Subject: MySQL data in user dirs -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 How to I put a users MySQL data into thier home dir? I have tried moving thier database over and sym-linking it: mv /var/lib/mysql/userdb /home/user ln -s /home/user/userdb /var/lib/mysql/userdb But mysql doesnt see the database. I also tried to move and symlink the tables themselves: mkdir /home/user/userdb mv /var/lib/mysql/userdb/* /home/user/userdb/ ln /home/user/userdb/... /lib/mysql/userdb/... (a few times) And it works. What I am a trying to achieve is to have the user's MySQL data size restricted by thier quota. Any suggestions? -BEGIN PGP SIGNATURE- Version: PGP 7.1 iQA/AwUBO99PjMGemXVaU1CGEQJDmwCfRB/aK/jiX0nZWLAjhWAx9pkUK7AAn3Au IiJogSGR/oTeuANl2CcaJ85p =6vec -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 -BEGIN PGP SIGNATURE- Version: PGP 7.1 iQA/AwUBO99UVsGemXVaU1CGEQJMVQCg2HeTmW3fnZsZKMct7vNW1hN7O+QAn3NY +AbMFtoNMlV7m0IyQ8d+7iRN =/+Z3 -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: Connection problem
MYSQL Hi! When i type: mysql -u franck -p then my password, it's ok. My machine's name is r-lx-collineau When i type mysql - h r-lx-collineau -u franck -p then my password, i have this message: ERROR 1130: host 'r-lx-collineau' is not allowed to connect to this MySQL server I think the host name 'r-lx-collineau' must have grant privilege in user(mysql) table. So,first,I advise you use shell mysql -h localhost -u franck -p connected to you database.If it work.Then,you must insert a record into user(mysql) table which grant you privilege connect to database from a host named 'r-lx-collineau'. Good luck! Can anybody help me ? Franck - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php = = = = = = = = = = = = = = = = = = = = Ö Àñ£¡ Lazy Dumbness [EMAIL PROTECTED] 2001-10-31 = = = = = = = = = = = = = = = = = = = = Ö Àñ£¡ Lazy Dumbness [EMAIL PROTECTED] 2001-10-31 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Having trouble using LIMIT
At 12:54 AM + 10/31/01, Mark Worsdall wrote: Hi, When I do the following in a perl script I get back all the records I want: $prep = SELECT id,name FROM go.objectives WHERE subjects_id='1' AND subjectHeadings_id='2' ORDER BY displayOrder; $sth = $dbh-prepare($prep); $sth-execute; But when I add in the LIMIT statement it returns no records $prep = SELECT id,name FROM go.objectives WHERE subjects_id='1' AND subjectHeadings_id='2' LIMIT 1,5 ORDER BY displayOrder; $sth = $dbh-prepare($prep); $sth-execute; Any idea why? Because you're not checking for errors (and apparently don't have RaiseError enabled). If you had done either of these things, you would have found out that the statement is illegal. (In particular, LIMIT goes at the end of the query.) MySQL table query M. -- Work:- postmasterAThinwick.demon.co.uk WEB:- http://www.hinwick.demon.co.uk Work:- mworsdallATshaftesburysoc.org.uk REPLACE AT with @ Home:- hinwickATworsdall.demon.co.ukWEB:- http://www.worsdall.demon.co.uk Shadow:- webmasterATshadow.org.uk WEB:- http://www.shadow.org.uk - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Can't create a table with MySQLGUI
Hi, I'm newly acquinted with MySQL today, and made a very first attempt to create a table with MySQLGUI. However, the Commands-Tables-Create Tables menu option doesn't seemed implemented -- nothing happens. Is this something that hasn't been implemented, or am I not using the tool correctly? I'm using the Win32 Static Binary of MySQLGUI 1.7.5-2. Can you please help? Thank you, Scott Seong - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Divide by 0 in a query ?
Hi. I have a query that determines the ranking of teams in a league by several calculations on the table. Below is the query: SELECT TeamName,TeamWins,TeamLosses,TeamSpirit, (TeamSpirit/(TeamWins+TeamLosses)*100) AS AvgSpirit, ((TeamWins*2)-TeamLosses) AS TeamPoints FROM Teams_1 WHERE DivisionName = 'A Division' AND LeagueID = 1 ORDER BY TeamPoints,AvgSpirit But the newly created attribute, AvgSpirit, will fail when a team has not won or lost a game ... Any ideas on how to remedy this problem? Thanks for the help, Camilo Rostoker -- ++ Camilo Rostoker Web Developer Scottsdale I.T. Consulting [EMAIL PROTECTED] http://www.scottsdale.ca/ ++ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 LOAD DATA INFILE
Hello all, I have a problem. I am able to get a copy of a text file which resides on another server for a task I am completing. What I need to do is import this text into a database table on a nightly basis, and I am trying to set this up via PHP so it is all automated. I have one problem though, and that is the format of the text file. The text file is not comma delimited or tab delimited, but it is a fixed format with each column spaced out evenly. I created a table with the same lengths as each field from the text file then I used the following line: LOAD DATA INFILE '/path/to/file.txt' INTO TABLE table_name IGNORE 1 LINES; This inserted the first field correctly but all other fields are NULL. If the file is tab delimited or comma delimited I'd have no problems, but since it isn't I am completely stuck... PLEASE HELP ME!!! Thank you, Michael. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: HOW do I return the results of a count to a variable
I'm new to this list, and new to mySQL but used SQL with DB2 years ago, so here goes my try at answering this: have you tried select count(*) as your_variable_name From etc .etc.etc. Anne - Original Message - From: Mark Worsdall [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 7:43 PM Subject: HOW do I return the results of a count to a variable Hi, I want to alter this statement so it returns the number of records. $prep = SELECT COUNT(*) FROM go.objectives WHERE subjects_id='1' AND subjectHeadings_id='2' ORDER BY displayOrder; $sth = $dbh-prepare($prep); $sth-execute; So what I need to do is add the COUNT statement into the above and then return the number of records but how? MySQL table query M. -- Work:- postmasterAThinwick.demon.co.uk WEB:- http://www.hinwick.demon.co.uk Work:- mworsdallATshaftesburysoc.org.uk REPLACE AT with @ Home:- hinwickATworsdall.demon.co.ukWEB:- http://www.worsdall.demon.co.uk Shadow:- webmasterATshadow.org.uk WEB:- http://www.shadow.org.uk - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Divide by 0 in a query ?
At 7:46 PM -0600 10/30/01, Camilo Rostoker wrote: Hi. I have a query that determines the ranking of teams in a league by several calculations on the table. Below is the query: SELECT TeamName,TeamWins,TeamLosses,TeamSpirit, (TeamSpirit/(TeamWins+TeamLosses)*100) AS AvgSpirit, ((TeamWins*2)-TeamLosses) AS TeamPoints FROM Teams_1 WHERE DivisionName = 'A Division' AND LeagueID = 1 ORDER BY TeamPoints,AvgSpirit But the newly created attribute, AvgSpirit, will fail when a team has not won or lost a game ... Any ideas on how to remedy this problem? Change: (TeamSpirit/(TeamWins+TeamLosses)*100) AS AvgSpirit, to: IFNULL((TeamSpirit/(TeamWins+TeamLosses)*100),0) AS AvgSpirit, Thanks for the help, Camilo Rostoker - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 turn beeping off
Hey now, why would you want to turn it off, After all its a `feature' [EMAIL PROTECTED] wrote: Back a few years there was a nasty little virus that played Chops on your WinDoDie box's and we had to unplug the PC Speakers on a couple dozen becuase there was not fix for it at the time. Or was it cause they where to cheap..hmm. Does anyone know how to turn that annoying beeping off in the text mode utilities such as mysql.exe? Cut the speaker cable. / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Comparing strings as ants^H^H^H^Hints
Some programming language in some platform could compare this string numeric. But, Why not use it in real numeric value (no quote) or use convert method before compare? SF At 13:24 30/10/2001 +0900, Joel Rees wrote: I don't have any experience with SQL, but I'm thinking that zero filling both might work: Although '5' = '40' is false, '0005' = '0040' is true. But since you should be using some glue code to validate the field from the web page anyway, can you just push the form field into a numeric before passing it to SQL? Would that do any good? Joel Rees [EMAIL PROTECTED] PS: Do posts tend to group around themes? Daniel James [EMAIL PROTECTED] wrote: [snipped] Here is the problem another way... select '5' = '6'; = 1 select '5' = '4'; = 0 select '5' = '40'; = 0- eegad. does anyone know how I can get around this? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 turn beeping off
If this hasn't been answered yet, the PC speaker on/off switch is usually an option in your system BIOS. I had the same problem on my Dell PE 2550 dev server until I switched it in setup. The problem with cutting the cable is that some motherboards have the speaker built in... n wires. :-) # Nathan - Original Message - From: Colin Faber [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 7:03 PM Subject: Re: How to turn beeping off Hey now, why would you want to turn it off, After all its a `feature' [EMAIL PROTECTED] wrote: Back a few years there was a nasty little virus that played Chops on your WinDoDie box's and we had to unplug the PC Speakers on a couple dozen becuase there was not fix for it at the time. Or was it cause they where to cheap..hmm. Does anyone know how to turn that annoying beeping off in the text mode utilities such as mysql.exe? Cut the speaker cable. / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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