Re: Possible bug - further refinement
I tested this with 3.23.38 and was not able to reproduce the problem. The UPDATE works as supposed for me. Did you compile the server yourself? If so, try an official binary. If not, please post more information, like where you got your binary from, which version it is and so on. Use mysqlbug utility if possible. No - as I posted on the first report, the problem occurred on 4.0.0alpha-nt. I have now reverted to 3.23.45 and the problem has disapeared; it is a 4.0 effect only (something to do with the new fulltext, possibly). No problem - that is what you expect with alpha software - but I would like to know it is recognised and will be solved in a future 4.0 release. PS: Could you get rid of that footer? It's annoying. Unfortunately not - it is added by the corporate mail server on the way out. A lot of UK corporate systems seem to be doing this - I think some legal PITA has said that you need it to protect yourself from his pack-mates. If you complain enough, I might have some ammo to shout at The Management, but at the moment I carry no weight compaired to the lawyers. Sorry. Alec Cawley - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Possible kernelbug?
Hello, I've made a app (in c) that uses mysqlclient to connect to MySQL. I'm having problems when calling sql_exit, which on linux-2.2 works fine, but on linux-2.4 I get a Unable to handle NULL pointer dereferance message from the kernel.. I've tried to recompile the latest stable mysql with both gcc-2.95 and 3.0, and it stay's the same. The most annoying that I got this working on one (!) 2.4.x machine, namely my laptop that i developed this software on.. Is this a known bug, or likely to be a bug in my software? --torgeir hansen [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
pb with compressed tables
Hello, I have a database with tables getting bigger and bigger (log tables). Thus every month I make an archive and then compress it with myisampack. I have a problem though. It seems that without a FLUSH TABLES, the tables don't appear correctly as compressed and can't be read until the end. I've made my code fine and added FLUSH TABLES, but however before doing that I'd tried to REPAIR one of those compressed tables (because I thought it was really corrupted) and now the table ends up completely unreadable by MySQL. I am a bit stuck because it seems I can't find any means of recovering the table after the REPAIR command (however the REPAIR itself said it was successful ;-)). mysql show table status like link_change_2001_10; | link_change_2001_10 | NULL | NULL | NULL | NULL | NULL |NULL | NULL | NULL | NULL | NULL | NULL| NULL| NULL | NULL| # myisamchk -efv /var/mysql/db/link_change_2001_10.MYI myisamchk: error: 127 when opening MyISAM-table '/var/mysql/db/link_change_2001_10.MYI' myisamchk: error: 127 when opening MyISAM-table '/var/mysql/db/link_change_2001_10.MYI' A quick sum up of the chronological process as I don't know if the above is quite clear : - myisampack -s /var/mysql/db/link_change_2001_10 - myisamchk -srq /var/mysql/db/link_change_2001_10 - the table is shown as fixed in SHOW TABLE STATUS, and can't be entirely read - I tried REPAIR TABLE so as to fix what I thought was a problem ; REPAIR returned ok - the table cannot be accessed anymore (NULL values in SHOW TABLE STATUS, myisamchk fails) The MySQL version is 3.23.43 (source distribution), with Berkeley DB and InnoDB enabled (however not used). It runs on a dual P3 1GHz with 1GB RAM and a three-disk harware RAID5 SCSI disk array. Thanks in advance for your help Yours Antoine. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Error list with explanation
Hi, Where can I find the list of errors generated by MYSQL and th explanation for the same (not the perror command). rgds, Kusuma ***Confidential Notice This e-mail communication may contain information that is confidential and privileged. The information is intended to be for the use of the addressee only. If you are not the named addressee you should not disseminate, distribute or copy this e-mail: to do so could be a breach of confidence. Kshema Technologies Ltd., # 1, Global Village, Mylasandra, Mysore Road, Bangalore 560059, INDIA. Tel: (91)-80-8603600-17 Fax: (91)-80-8603372 ** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
WISHLIST: auto_increment after delete
Hello MySQL developers please add a ALTER TABLE xyz eternal_auto_increment=1; that forces the auto_increment column to increment regardless of which table type I use and how I delete my columns. As long as there is a way to reset the column somehow (by setting it to -1 or so) I would find this very comfortable. At least it's horror if my column starts behaving differently if I only change the table type to get COMMIT/ROLLBACK or forget to delete with DELETE FROM xyz WHERE 1; instead of the normal DELETE FROM xyz;. (Yes I know that all is documented somewhere but still it's hard to use..) thanks, -christian- -- Christian HammersWESTEND GmbH - Aachen und Dueren Tel 0241/701333-0 [EMAIL PROTECTED] Internet Security for ProfessionalsFax 0241/911879 WESTEND ist CISCO Systems Partner - Premium Certified - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Changing data
how would I change in all rows data that is; 00 to 000-000- or (000) 000- Can this even be done with mysql? Thank you in advance... Vern H. Gill State Director Director of Marketing Conejo Valley Jaycees http://www.conejovalleyjaycees.org - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re:mysql_insert_id and transactions
Hi Jason and Heikki, Heikki Tuuri writes: Jason, SELECT LAST_INSERT_ID() seemed to work from the mysql client. That is a workaround. I forward this message to Sinisa and Venu, so that they can check the Perl interface. From the manual page of mysql_insert_id() I found the following comment: Charles Merriam: This may only work on most recent versions of MySQL; and may not work even then. The work around is to do a SELECT LAST_INSERT_ID() after your insert. I'm not sure about the performance penalty; www.truegift.com is not performance driven. Good luck! I wasn't aware of such writing. Heikki, can you please forward the exact URL to me so that I can check this; I couldn't find the page you were referring to? Thanks. mysql_insertid in Perl should always work if it is used right after the insert statement. It is faster than using SELECT LAST_INSERT_ID(), because in the latter case an extra query is sent to the server. When one uses Perl's mysql_insertid, Perl can check the auto_increment value from the client-server protocol and doesn't have to do the extra query. cut I'm tyring to do a transaction in mysql/innodb in perl with the following basic flow eval{ Insert my first record get the insert_id (using $sth-{mysql_insert_id}) now perform other inserts that need that key commit;}; if($@){ rollback;and other logic} the only problem is the {mysql_insert_id} doesn't give me anything back. NADA... Is this a bug only in transactions or innodb? since I know the function is working in autocommit / MyIsam tables. Do I have to do the select last_insert_id ? Because that IS working (and consequently what I am doing now).using .43 on linux RH7.1 compiled from source -- Jayce^ Jason, can you please check that you are calling reference 'mysql_insertid' and NOT 'mysql_insert_id' ? Sometimes Perl may ignore the underscores, if it can't find the reference otherwise (that's what I've heard, but I'm not sure), but the real function call is without the latter underscore. For me it only works if I use '$dbh-{mysql_insertid}' If that wasn't the cause, we probably need to see an exact piece of your Perl code. Regards, - Jani For technical support contracts, visit https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Jani Tolonen [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: 64bit mysql and gcc
Ian writes: Greetings, I am having some trouble getting a 64bit mysql (built with gcc) to work correctly. I am able to build and start mysql, but it crashes anytime I try to manipulate a table with some data in it. This is using mysql-3.23.42. Thanks in advance, IW. Ian Waters [EMAIL PROTECTED]/interesting.net/geekninja.net/geekcoop.com PGP Public Key: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xFF7EE368 GCC 3.* is not fully tested on Solaris. Why don't you just use our binaries. They have been built to be 64 bit. -- 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
workaround count AND the lack of subqueries
Dear List reader and especially list writer, I usually get around the missing of subselects, but now i really don't know how to do without whats impossible at the moment.. In a rather big query involving 7 tables, one of the tables has to meet 5 conditions. Can somebody tell me how to do this within a 3.23 environment, tia. Maarten a) the Value X of this table must be the same as value X of the other table. b) the table has a row which have a value X in column 2 c) the table has a row which have a value Y in column 3 d) the table has another row which have a value X in column 2 e) the table has a maximum of 2 rows with X in column 2 shortened query select a1.DOMAINNAME from CUSTOM_ARECORDS as a1, CUSTOM_NS as n1, CUSTOM_NS as n2 where a1.DOMEINNAME=n1.DOMEINNAME and // Point A n1.DOMEINNAME=n2.DOMEINNAME and a1.CUSTOM_ARECORDTARGET='xx.xx.36.18'// Other table and n1.CUSTOM_NAMESERVER='ns1.isp.com.' // point B and n1.CUSTOM_PRIMARY='1'// point C and n2.CUSTOM_NAMESERVER='ns2.isp.com.' // point D /shortened query The problem is E; I want to have a max count of rows which meet the A -condition not bigger then 2 WHISH select a1.DOMAINNAME from CUSTOM_ARECORDS as a1, CUSTOM_NS as n1, CUSTOM_NS as n2 where a1.DOMEINNAME=n1.DOMEINNAME and // Point A n1.DOMEINNAME=n2.DOMEINNAME and a1.CUSTOM_ARECORDTARGET='xx.xx.36.18'// Other table and n1.CUSTOM_NAMESERVER='ns1.isp.com.' // point B and n1.CUSTOM_PRIMARY='1'// point C and n2.CUSTOM_NAMESERVER='ns2.isp.com.' // point D and ( select count(*) // point E by impossible subselect from CUSTOM_NS as sn1, where sn1.DOMAINNAME=a1.DOMAINNAME ) 3 ; WISH - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Connecting to mysql server in a remote site and using LOAD command
Dear All, I have Mysql server installed at remote site which i need to connect to. I have tried this from my local computer but didn't work; c:\mysql\binmysql -h myhost -u myusername -pmypassword I will also like to use LOAD command to load a text file from my local computer to the database on this mysql server at the remote site. I have been able to achieve both actions from my local machine. I am using win 98, Mysql 3.23 All supports to get these done will be appreciated. Thanks to you all. kamal. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
32 bit or 16 bit
Does anyone know if there is any 16 bit code at all in mySQL. Ever since installing mySQL for evaluation I've had a rash of NTVDM.EXE's running around my machine and twice have had so many it brought it to almost a stand still. I didn't have this problem before the installation of mySQL. Tim - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Converting from myisam to InnoDB
I'm trying to switch from myisam to InnoDB. I've edited my.cnf (see below). When I try to start mysql-max: [root@db1 mysql]# safe_mysqld --skip-bdb Starting mysqld-max daemon with databases from /home/dbclnbs/mysql/ 011203 15:00:00 mysqld ended Error log: 011203 14:59:54 mysqld started InnoDB: Warning: operating system error number 13 in a file operation. InnoDB: Cannot continue operation. 011203 15:00:00 mysqld ended [root@db1 mysql]# ls -l /home/dbclnbs/mysql/ total 428 drwxrwxr-x2 mysqlmysql4096 Dec 2 15:37 innodb Here's part of my.cnf: innodb_data_file_path = cb1:3000M innodb_data_home_dir = /home/dbclnbs/mysql/innodb innodb_log_group_home_dir = /home/dbclnbs/mysql/innodb innodb_log_arch_dir = /home/dbclnbs/mysql/innodb set-variable = innodb_mirrored_log_groups=1 set-variable = innodb_log_files_in_group=3 set-variable = innodb_log_file_size=5M set-variable = innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 innodb_log_archive=0 set-variable = innodb_buffer_pool_size=512M set-variable = innodb_additional_mem_pool_size=2M set-variable = innodb_file_io_threads=4 Why the permission error ? (RH 7.2, mysql 3.23.46) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Is it right to use GROUP BY in this situation.
Good day to you all. This is not a problem so much as checking that I am not missing something obvious, before I change the way my mind deals with this type of situation in MySQL. I have two tables Table c: +-+-+ | c1 | c2 | +-+-+ | 1 | foo | | 2 | bar | +-+-+ Table d: +-+---+---+ | d1 | d2 | d3 | +-+---+---+ | foo | red card | shop1 | | bar | blue card | shop1 | | foo | red card | shop2 | | bar | blue card | shop2 | +-+---+---+ Table d deliberately has multiple entries in d1 I want to select data from both table c and d so that I return +-+-+-_-+ | c1 | c2 | d2| +-+-+---+ | 1 | foo | red card | | 2 | bar | blue card | +-+-+---+ Basically I want the all of the data from table c but need to get some extra info e.g. descriptions from table d. Using: SELECT c.c1,c.c2,d.d2 FROM c LEFT JOIN d ON c2=d1 returns +-+-+-_-+ | c1 | c2 | d2| +-+-+---+ | 1 | foo | red card | | 1 | foo | red card | | 2 | bar | blue card | | 2 | bar | blue card | +-+-+---+ Due the duplications within d1. I can GROUP BY c.c1 (unique row number) to return the results I want but I am not sure if this is the intended/best way to get this result. Regards Waine. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Help please :)
On Sunday 02 December 2001 01:12 pm, Ian Moss wrote: I'm trying to run mysql 3.23 on suse linux. Ian: We need some more info to be able to help you. What SuSE version? Please also post a full report about your system with mysqlbug... -- MySQL Development Team For technical support contracts, visit https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sasha Pachev [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA ___/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 in-memory configuration
Hello, Can mySQL be configured to run entirely in-memory? That is, can one configure it so that all the tables, data, etc. remain resident in memory and are never written to disk? TIA, Tim Banach - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To 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 in-memory configuration
Banach, Timothy P writes: Hello, Can mySQL be configured to run entirely in-memory? That is, can one configure it so that all the tables, data, etc. remain resident in memory and are never written to disk? TIA, Tim Banach Hi! Take a look at our HEAP table type. -- 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
difficult join?
I have the following situation Three tables 1) players 2) teams 3) team_player 'players' holds player records and player_id is auto_increment primary key 'teams' holds team records and team_id is auto_increment primary key 'team_player' is a table which holds records for which player belongs to which team That is team_player has 3 columns 1) id (auto_increment primary key) 2) team_id 3) player_id My problem is that I want to extract the record set from 'players' table for those players which do not belong to any team ie they will not have player_id in 'team_player' table. I don't know how to write the join in the query .. if it is possible. Any help is greatly appreciated. I am not subscribed to the list so please cc any replies. Thanks Jaskirat _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mySQL in-memory configuration
I'm not sure, but you'd be in big trouble if your system lost power! -- Erik On Monday, December 3, 2001, at 10:50 AM, Banach, Timothy P wrote: Hello, Can mySQL be configured to run entirely in-memory? That is, can one configure it so that all the tables, data, etc. remain resident in memory and are never written to disk? TIA, Tim Banach - Before posting, please check: http://www.mysql.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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Image's
Either the coffee is flat or someone switched to decafe on me. What is the proper way to retrive an image that is stored as a path in a field name with SQL? My path would be something like Table=YPEOPLE field=pictures with the path like this c:\images\110101\yourpic.jpeg Also is there a way to do this. I have an aging DOS FoxPro database (see above) that is still in constant use. I imported the tables into MySQL, 200+ Tables and some 200,000 rows, and I would like to update just the New info. Reason. They flat will not give up the monster in accounting. Period. So to make Win users happy I have a small GUI for searchs and stuff,,all read only. Off in seach of a Starbucks. M;) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Netscape ignores %20 with $sort=id DESC
Try adding a line right below $sort: $sort = urlencode($sort); It should add the %20s for you. - Jonathan -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 02, 2001 8:35 PM To: Paul Markov Cc: [EMAIL PROTECTED] Subject: RE: Netscape ignores %20 with $sort=id DESC On 02-Dec-2001 Paul Markov wrote: Hi, some users of my web are having problems with sorting a MySQL table because older versions of Netscape do not recognize a blank space and do not convert it into a %20. Here's my situation: $sort = id DESC if ($page_num != $total_num_page){print a ref=\./propview.php?$guidestringcur_page=$nextpagesort=$sort\Next Page/a Netscape drops DESC because it can't convert the blank space into a %20. (this works fine with newer versions of Netscape. Internet Explorer does not have such a problem). Is there a workaround for this problem? The '%20' is correct by current standards. For backwards compatibilty, you can try a plus sign 'id+DESC' (be aware that this is now the wrong way to do it). 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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
ISAM 2 MyISAM Conversion
I have an existing database with ISAM tables that I would like to convert to MyISAM tables. Using phpMyAdmin, I can change the table type using a drop-down box, however I do not know the repercussions of the table type conversion. Any advice, Steve Osborne Database Programmer Chinook Multimedia Inc. [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: Changing data
Try this query: UPDATE table SET phone = concat((,left(phone,3),) ,mid(phone,3,3),-,mid(phone,6,4)); It should convert 00 to (000) 000-. Take a look at this page if you want details on how it works: http://www.mysql.com/doc/S/t/String_functions.html - Jonathan -Original Message- From: Gill, Vern [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:23 AM To: '[EMAIL PROTECTED]' Subject: Changing data how would I change in all rows data that is; 00 to 000-000- or (000) 000- Can this even be done with mysql? Thank you in advance... Vern H. Gill State Director Director of Marketing Conejo Valley Jaycees http://www.conejovalleyjaycees.org - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Image's
tryt constructing a URL like file:///images/110101/yourpic.jpg out of the location... [EMAIL PROTECTED] wrote: Either the coffee is flat or someone switched to decafe on me. What is the proper way to retrive an image that is stored as a path in a field name with SQL? My path would be something like Table=YPEOPLE field=pictures with the path like this c:\images\110101\yourpic.jpeg Also is there a way to do this. I have an aging DOS FoxPro database (see above) that is still in constant use. I imported the tables into MySQL, 200+ Tables and some 200,000 rows, and I would like to update just the New info. Reason. They flat will not give up the monster in accounting. Period. So to make Win users happy I have a small GUI for searchs and stuff,,all read only. Off in seach of a Starbucks. M;) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Image's
The GUI is built in Delphi and uses a grid and a TDBImage and when you scroll through the Grid or Search I need to be able to retrive the image that goes with the persons name. The Web thought has me thinking since I use PHP to do this with my web site it might be easy to do. But I would rather just use an SQL Script to retrive the info.. M;) tryt constructing a URL like file:///images/110101/yourpic.jpg out of the location... [EMAIL PROTECTED] wrote: Either the coffee is flat or someone switched to decafe on me. What is the proper way to retrive an image that is stored as a path in a field name with SQL? My path would be something like Table=YPEOPLE field=pictures with the path like this c:\images\110101\yourpic.jpeg Also is there a way to do this. I have an aging DOS FoxPro database (see above) that is still in constant use. I imported the tables into MySQL, 200+ Tables and some 200,000 rows, and I would like to update just the New info. Reason. They flat will not give up the monster in accounting. Period. So to make Win users happy I have a small GUI for searchs and stuff,,all read only. Off in seach of a Starbucks. M;) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Fw: Stalled MySQL process causing high CPU load
Sorry to repost this, but I have no idea what to do about this problem, which is making our systems almost unworkable. Does anyone have any suggestions about what to do about this, or at least tests I could try to narrow down the possible causes. Would it help to upgrade MySQL to a later version of 3 or to version 4? Or should I scrap MySQL and try PostgreSQL? - Original Message - From: Bruno Prior [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 21, 2001 10:05 PM Subject: Stalled MySQL process causing high CPU load I am a MySQL novice, so there may be a simple explanation for this. But I have been unable to find one in the list archives, although several people seem to have had similar problems. I am running MySQL 3.23.36 from the package that comes with Mandrake linux 8.0. I am using linux software-RAID mirroring, which required upgrading the kernel to 2.4.6-ac2. The hardware is relatively limited (Duron 800, 128Mb RAM), but so are our MySQL requirements. I currently run 2 databases from it. One is a home-grown contacts and document management database with around 20 tables, none with more than 1,000 records, which I migrated off MS Access 2000. The other is the tables (around 30 or so) required for phpgrouware, which I am testing, and consequently have very few records in any of the tables. phpgroupware was the first to be set up, and shortly after I started trialling it, I started having a problem with random MySQL processes suddenly going into a spin and consuming all the CPU time (around 95% according to top), consequently slowing the machine dramatically. According to ps, the stalled process is a sibling of the process whose pid is stored in the pid file, but the process does not respond in any way to mysqladmin. the process cannot be killed with mysqladmin or kill, and attempts to shutdown the database with mysqladmin or safe-mysql (called from the init script) go into a permanent loop. The only way I can get out of it is to reboot the server. What makes this particularly hard to track down is that it often occurs when no one is even using the database. It occurs with both databases, so I don't think it is caused by PHP or MyODBC, which are used to connect to the two databases. Nor is the load real - these lockups usually occur when there is little happening on the server, and nothing happening with MySQL. Nor do I think it is a lock problem - it has occurred frequently when I have been the only person accessing the server. To avoid posting all my vital statistics to the mailing list, I have put the output of various mysqladmin commands on our server, in the hope that someone might like to take a look to see if I have an obvious problem with my configuration. The output of mysqladmin version, extended-status, variables and processlist are on http://www.summerleaze.co.uk respectively at /mysql-vers.txt, /mysql-status.txt, /mysql-vars.txt and /mysql-process. I hope I have provided sufficient information. Does anyone have any idea what might be causing this? Cheers, Bruno Prior [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re:mysql_insert_id and transactions
Hi! Ok, the problem the user had probably was calling the wrong Perl function. From the MySQL manual: insertid If you use the AUTO_INCREMENT feature of MySQL, the new auto-incremented values will be stored here. Example: $new_id = $sth-{insertid}; As an alternative, you can use $dbh-{'mysql_insertid'}. Regards, Heikki http://www.innodb.com -- Order commercial MySQL/InnoDB support at https://order.mysql.com/ At 01:12 PM 12/3/01 +0200, you wrote: Hi Jason and Heikki, Heikki Tuuri writes: Jason, SELECT LAST_INSERT_ID() seemed to work from the mysql client. That is a workaround. I forward this message to Sinisa and Venu, so that they can check the Perl interface. From the manual page of mysql_insert_id() I found the following comment: Charles Merriam: This may only work on most recent versions of MySQL; and may not work even then. The work around is to do a SELECT LAST_INSERT_ID() after your insert. I'm not sure about the performance penalty; www.truegift.com is not performance driven. Good luck! I wasn't aware of such writing. Heikki, can you please forward the exact URL to me so that I can check this; I couldn't find the page you were referring to? Thanks. mysql_insertid in Perl should always work if it is used right after the insert statement. It is faster than using SELECT LAST_INSERT_ID(), because in the latter case an extra query is sent to the server. When one uses Perl's mysql_insertid, Perl can check the auto_increment value from the client-server protocol and doesn't have to do the extra query. cut I'm tyring to do a transaction in mysql/innodb in perl with the following basic flow eval{ Insert my first record get the insert_id (using $sth-{mysql_insert_id}) now perform other inserts that need that key commit;}; if($@){ rollback;and other logic} the only problem is the {mysql_insert_id} doesn't give me anything back. NADA... Is this a bug only in transactions or innodb? since I know the function is working in autocommit / MyIsam tables. Do I have to do the select last_insert_id ? Because that IS working (and consequently what I am doing now).using .43 on linux RH7.1 compiled from source -- Jayce^ Jason, can you please check that you are calling reference 'mysql_insertid' and NOT 'mysql_insert_id' ? Sometimes Perl may ignore the underscores, if it can't find the reference otherwise (that's what I've heard, but I'm not sure), but the real function call is without the latter underscore. For me it only works if I use '$dbh-{mysql_insertid}' If that wasn't the cause, we probably need to see an exact piece of your Perl code. Regards, - Jani For technical support contracts, visit https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Jani Tolonen [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Netscape ignores %20 with $sort=id DESC
This isn't the same piece of code, either. The code you posted was for creating a piece of HTML code for an A HREF=... containing the variable $sort. The code you're showing us now is for a MySQL query. MySQL is looking for the characters %20, not a space, in the field you're searching through. That's why the query comes up empty. So, basically you would do this: if ($sort == ) {$sort = id DESC;} $querystring = $querystring. ORDER BY $sort; $result = mysql_query($querystring;,$link); $num_rows = mysql_num_rows($result); $sort = urlencode($sort); if ($page_num != $total_num_page){print a ref=\./propview.php?$guidestringcur_page=$nextpagesort=$sort\Next Page/a The %20 will only appear in the link, not in the query. - Jonathan -Original Message- From: Paul Markov [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 8:56 AM To: Jonathan Hilgeman; 'Don Read' Subject: Re: Netscape ignores %20 with $sort=id DESC Jonathan, Thanks for the tip... I thought it was going to work, but I got this error: Supplied argument is not a valid MySQL result resource in (point exactly at $sort = urlencode($sort); ) By just using id+DESC I also get the Supplied argument is not a valid MySQL result resource . Here's a little more of the code - anything to do with the { } brackets? if ($sort == ) {$sort = id DESC;} $sort = urlencode($sort); $querystring = $querystring. ORDER BY $sort; $result = mysql_query($querystring;,$link); $num_rows = mysql_num_rows($result); Thanks again for your help! Paul. - Original Message - From: Jonathan Hilgeman [EMAIL PROTECTED] To: 'Don Read' [EMAIL PROTECTED]; Paul Markov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, December 03, 2001 11:17 AM Subject: RE: Netscape ignores %20 with $sort=id DESC Try adding a line right below $sort: $sort = urlencode($sort); It should add the %20s for you. - Jonathan -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 02, 2001 8:35 PM To: Paul Markov Cc: [EMAIL PROTECTED] Subject: RE: Netscape ignores %20 with $sort=id DESC On 02-Dec-2001 Paul Markov wrote: Hi, some users of my web are having problems with sorting a MySQL table because older versions of Netscape do not recognize a blank space and do not convert it into a %20. Here's my situation: $sort = id DESC if ($page_num != $total_num_page){print a ref=\./propview.php?$guidestringcur_page=$nextpagesort=$sort\Next Page/a Netscape drops DESC because it can't convert the blank space into a %20. (this works fine with newer versions of Netscape. Internet Explorer does not have such a problem). Is there a workaround for this problem? The '%20' is correct by current standards. For backwards compatibilty, you can try a plus sign 'id+DESC' (be aware that this is now the wrong way to do it). 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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Hacked Servers
Hi We have 2 Redhat 6.1 servers and MySQL 3.22.32 and both boxes appear to have been hacked on Friday last and MYSQL client just hangs when connecting to the localhost MYSQL server. MySQL is running on both boxes and suffer the same problems. We also have to use kill -9 pid number to kill the server(s). No MySQL client can connect remotely to either of these machines however the local MySQL client on the hacked server(s) can connect to other remote MySQL servers. We have re-installed MySQL server on this hacked server and still the client just hangs and no errors in the logs appear. We have Intrusion software but its very long winded trying to find how to fix it - and ultimately we will re-install. (but first I have 600 clients per server to please!) Please HELP we and all our tech guys are stumped. Any more info please ask. Kind regards Tony - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Hacked Servers
Hi there, I feel for you. Been there myself before I installed a firewall router. (Very useful, BTW, to restrict access to only your customers IPs instead of the whole world.) There isn't really enough info provided here to know for sure, but it might be that when you were hacked, your inetd.conf file was hacked as well closing services to the world. Maybe even your MySQL user/hosts tables, so check permissions there as well. Some rootkits will restrict access after they have hacked a machine to make sure that their hack doesn't get overwritten by some other hacker. This can also lock you out of the machine except from the direct console. So you might want to check your inetd configuration and hit http://www.sans.org, http://www.incidents.org, and http://www.dshield.org for more info. Things to search for might be t0rn rootkit, ramen worm, l0in, etc. Here's a link about the ramen worm to get you started. http://www.sans.org/y2k/ramen.htm It also contains a link to a script to detect the worm on your server. Of course, after you get things a little more under control, you'll need to reinstall OS, change passwords, etc. You might also want to post the exploit via http://www.incidents.org. Best of luck! -Joe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 10:26 AM To: [EMAIL PROTECTED] Subject: Hacked Servers Hi We have 2 Redhat 6.1 servers and MySQL 3.22.32 and both boxes appear to have been hacked on Friday last and MYSQL client just hangs when connecting to the localhost MYSQL server. MySQL is running on both boxes and suffer the same problems. We also have to use kill -9 pid number to kill the server(s). No MySQL client can connect remotely to either of these machines however the local MySQL client on the hacked server(s) can connect to other remote MySQL servers. We have re-installed MySQL server on this hacked server and still the client just hangs and no errors in the logs appear. We have Intrusion software but its very long winded trying to find how to fix it - and ultimately we will re-install. (but first I have 600 clients per server to please!) Please HELP we and all our tech guys are stumped. Any more info please ask. Kind regards Tony - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Hacked Servers
Been there too. Sounds like a 'script kiddy'. You should check your hosts.allow/deny, then firewall software configuration (ipchains?) files. That MIGHT get you into a functional situation. Also, programs like 'ls', ps, netstat ,etc have been replaced on your system, and you won't be able to delete then without special file control knowledge. Plan on spending a bunch of time or simply rebuilding the server. Check your root directory and the password file. Fastest way to a working server is to build a new one and patch it in, until you get the others working. Good luck, Kevin [EMAIL PROTECTED] wrote: Hi We have 2 Redhat 6.1 servers and MySQL 3.22.32 and both boxes appear to have been hacked on Friday last and MYSQL client just hangs when connecting to the localhost MYSQL server. MySQL is running on both boxes and suffer the same problems. We also have to use kill -9 pid number to kill the server(s). No MySQL client can connect remotely to either of these machines however the local MySQL client on the hacked server(s) can connect to other remote MySQL servers. We have re-installed MySQL server on this hacked server and still the client just hangs and no errors in the logs appear. We have Intrusion software but its very long winded trying to find how to fix it - and ultimately we will re-install. (but first I have 600 clients per server to please!) Please HELP we and all our tech guys are stumped. Any more info please ask. Kind regards Tony - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Hacked Servers
On Mon, Dec 03, 2001 at 05:25:38PM -, [EMAIL PROTECTED] wrote: : Hi : : We have 2 Redhat 6.1 servers and MySQL 3.22.32 and both boxes : appear to have been hacked on Friday last and MYSQL client just hangs : when connecting to the localhost MYSQL server. : : MySQL is running on both boxes and suffer the same problems. : : We also have to use kill -9 pid number to kill the server(s). : : No MySQL client can connect remotely to either of these machines however the : local MySQL client on the hacked server(s) can connect to other remote MySQL : servers. : : We have re-installed MySQL server on this hacked server and still the client : just hangs and no : errors in the logs appear. : : We have Intrusion software but its very long winded trying to find how to : fix it - and ultimately we will re-install. : (but first I have 600 clients per server to please!) : : Please HELP we and all our tech guys are stumped. Well, hopefully you have backups. If you don't, the data in your database is most likely safe, so back it up. Then completely wipe the box and start over from scratch. You should jut be able to copy the data files to back them up. I wouldn't recommend copying the mysql/ tables, though. They're probably tainted. The only way you're going to be sure that your box is safe is if you wipe and reinstall. Most hacker kits will install backdoors and exploitable holes. Using a hacked server is just a risk to everything you do. * Philip Molter * Texas.net Internet * http://www.texas.net/ * [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: [MySQL] can you have a no-default column; error if unspecified?
Bennett Haselton wrote: NOT NULL doesn't mean that the column doesn't have a default, it just means that the default is not null. In other, more conventional (:-)), databases, NOT NULL means simply NOT NULL, and implies nothing about defaults - that's a MySQL-ism. (Thus, a NOT NULL column with no default should give an error if you insert without specifying a value for that column, since the default DEFAULT should be NULL). It's possible to compile MySQL with a special *compile-time* flag (see the flag -DDONT_USE_DEFAULT_FIELDS in http://www.mysql.com/doc/B/u/Bugs.html and http://www.mysql.com/doc/c/o/configure_options.html). And I'm glad to see that this behavior is listed as a bug rather than as a feature :-), which gives me hope that someday it will be tackled (to at least make it a run-time configurable option rather than a compile-time forced option). -- 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
Accessing mysql from sql7.0
Hi, I have added the mysql server as a linked server in MS-SQL7.0. How do i run distributed queries against the mysql server from MS-QL query analyzer. Is it possible and if so how is it done? regards bala - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Problem making myodbc on Solaris 8
Hi, -Original Message- From: Matthew Dougherty [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 11:06 AM To: [EMAIL PROTECTED] Subject: Problem making myodbc on Solaris 8 make fails with mksh: Fatal error in reader: = missing from replacement macro reference Current working directory /opt/perlModules/MyODBC-2.50.37 I have ODBC working for SQL Server. If I do a make -V is leads me to a bad set of lines in Makefile: DEPS_MAGIC := $(shell mkdir .deps /dev/null 21 ||:) -include $(DEP_FILES) If I take out the colon on the :=, I don't get an error. Is the -include a typo? I don't see a matching subroutine in Makefile. If I change it to include $(DEP_FILES) it can't find the files. DEP_FILES is previously defined as a list of files in .deps. I am running as root using GCC 2.95. I have a separate build of perl that I am using instead of /usr/bin/perl on Solaris 8. The PATH is set to /usr/local/bin:/usr/local/mysql/bin:/usr/bin:/usr/sbin:/usr/ccs/bin I am using the make in /usr/ccs/bin. The LD_LIBRARY_PATH is set to /usr/local/lib:/usr/local/mysq:/usr/lib The configure command is as follows: ./configure --with-odbc-ini=/etc/odbc.ini --with-iodbc-includes=/usr/local/openlink/w3configu/include --with-iodbc-libs=/usr/local/openlink/lib --with-mysql-dirs=/usr/local/mysql/lib/mysql --with-mysql-includes=/usr/local/mysql/include/mysql Can you download and try the latest version 2.50.39(unix source) from: http://www.mysql.com/downloads/api-myodbc.html Regards, Venu -- For technical support contracts, go to https://order.mysql.com __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mr. Venu [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer /_/ /_/\_, /___/\___\_\___/ California, USA ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: SHOW TABLES; show nothing
Hi, Try myisamchk'ing you mysql tables. Regards Quentin -Original Message- From: Gill, Vern [mailto:[EMAIL PROTECTED]] Sent: Monday, 3 December 2001 5:40 p.m. To: [EMAIL PROTECTED] Subject: SHOW TABLES; show nothing mysql CREATE TABLE faxblast (company VARCHAR(100), phone VARCHAR(12), fax TINYINT (10) UNSIGNED, state CHAR(2), description VARCHAR(80), sic VARCHAR(7)); Query OK, 0 rows affected (0.09 sec) mysql SHOW TABLES; Empty set (0.00 sec) mysql DESCRIBE faxblast - ; +-+--+--+-+-+---+--- --+ | Field | Type | Null | Key | Default | Extra | Privileges | +-+--+--+-+-+---+--- --+ | company | varchar(100) | YES | | NULL| | select,insert,update,references | | phone | varchar(12) | YES | | NULL| | select,insert,update,references | | fax | tinyint(10) unsigned | YES | | NULL| | select,insert,update,references | | state | char(2) | YES | | NULL| | select,insert,update,references | | description | varchar(80) | YES | | NULL| | select,insert,update,references | | sic | varchar(7) | YES | | NULL| | select,insert,update,references | +-+--+--+-+-+---+--- --+ 6 rows in set (0.01 sec) mysql use mysql Database changed mysql use pcdocrx Database changed mysql DESCRIBE faxblast; +-+--+--+-+-+---+--- --+ | Field | Type | Null | Key | Default | Extra | Privileges | +-+--+--+-+-+---+--- --+ | company | varchar(100) | YES | | NULL| | select,insert,update,references | | phone | varchar(12) | YES | | NULL| | select,insert,update,references | | fax | tinyint(10) unsigned | YES | | NULL| | select,insert,update,references | | state | char(2) | YES | | NULL| | select,insert,update,references | | description | varchar(80) | YES | | NULL| | select,insert,update,references | | sic | varchar(7) | YES | | NULL| | select,insert,update,references | +-+--+--+-+-+---+--- --+ 6 rows in set (0.00 sec) mysql SHOW TABLES; Empty set (0.00 sec) Someone please explain to my why this is happening? In fact, could someone explain this too?; # mysql -p Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 66 to server version: 3.23.28-gamma Type 'help;' or '\h' for help. Type '\c' to clear the buffer mysql SHOW DATABASES; +--+ | Database | +--+ | | | | | | | | | | | | | | +--+ 7 rows in set (0.00 sec) mysql SHOW TABLES; ERROR 1046: No Database Selected mysql use mysql Database changed mysql SHOW TABLES; Empty set (0.00 sec) mysql quit Bye [root@localhost /tmp]# ls /usr/local/var/ total 20k 4.0k drwx--2 root root 4.0k Dec 2 20:20 PC_Doctor_RX.orig/ 4.0k drwx--2 root root 4.0k Dec 2 11:02 mysql/ 4.0k -rw-r--r--1 root root5 Nov 29 16:26 mysqld.pid 4.0k drwx--2 root root 4.0k Dec 2 20:29 pcdocrx/ 4.0k drwx--2 root root 4.0k Nov 30 12:01 ulog/ Vern H. Gill State Director Director of Marketing Conejo Valley Jaycees http://www.conejovalleyjaycees.org - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php 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:
Granting Access in MySQL
Hello everyone, I'm trying to grant rights to several user accessing my database. Right now I'm using their individual IP addresses to grant them privileges. Which works fine. This way I have to assign user name and password to each and everyone of them. What I want is to enable everyone within my network to connect to my DB. For that I need a valid host name. I have tried %, which supposed to let everyone in, but no luck. I also tried something like 10.45.*.* or 10.45.%.% but no luck. I'm stuck. What else can I do? Regards, Oganes Demirchyan Motorola Life Science 757 S.Raymond Pasadena, CA 91105 Tel: 626-584-5900 email: [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: Granting Access in MySQL
Did you Flush your table when you changed permissions? Hello everyone, I'm trying to grant rights to several user accessing my database. Right now I'm using their individual IP addresses to grant them privileges. Which works fine. This way I have to assign user name and password to each and everyone of them. What I want is to enable everyone within my network to connect to my DB. For that I need a valid host name. I have tried %, which supposed to let everyone in, but no luck. I also tried something like 10.45.*.* or 10.45.%.% but no luck. I'm stuck. What else can I do? Regards, Oganes Demirchyan Motorola Life Science 757 S.Raymond Pasadena, CA 91105 Tel: 626-584-5900 email: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Viewing table data in a webpage using ASP
Hi, I'm trying to view the records of a table in on a webpage, but nothing is showing up. I can add records to the table from the page but cannot view, update or delete them. I'm using Windows 2000 and IIS 5.0 I'm new to MySql and would greatly appreciate any help anyone can give me. Nick Boldt Computer Network Administrator Track of the Wolf Elk River, MN 55330 Tel: 763-633-2500 Fax: 763-633-2550 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Viewing table data in a webpage using ASP
Here is the connection code I use to view record information from a table. I'm using Dreamweaver Ultradev 4 to help with some of the basic coding. I am using MyODBC. % MM_TrackoftheWolf_STRING = dsn=DSN Name;uid=User Id;pwd=Password; set ship_address = Server.CreateObject(ADODB.Recordset) ship_address.ActiveConnection = MM_TrackoftheWolf_STRING ship_address.Source = SELECT * FROM customershipping ship_address.CursorType = 0 ship_address.CursorLocation = 1 ship_address.LockType = 3 ship_address.Open() ship_address_numRows = 0 % % Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 ship_address_numRows = ship_address_numRows + Repeat1__numRows % Nick Boldt Computer Network Administrator Track of the Wolf Elk River, MN 55330 Tel: 763-633-2500 Fax: 763-633-2550 [EMAIL PROTECTED] -Original Message- From: Christopher R. Jones [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:07 PM To: Nick Boldt Subject: Re: Viewing table data in a webpage using ASP If you have MyODBC installed and working you should be able to view the records. I have a number of WEB pages that display MySQL data using ASP/ADO. You should send an example of you ASP script to the group to help clarify your problem. Hi, I'm trying to view the records of a table in on a webpage, but nothing is showing up. I can add records to the table from the page but cannot view, update or delete them. I'm using Windows 2000 and IIS 5.0 I'm new to MySql and would greatly appreciate any help anyone can give me. Nick Boldt Computer Network Administrator Track of the Wolf Elk River, MN 55330 Tel: 763-633-2500 Fax: 763-633-2550 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php Christopher R. Jones, P.Eng. 14 Oneida Avenue Toronto, Ontario M5J 2E3 Tel. 416 203-7465 Fax. 416 203-8249 Email [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: Viewing table data in a webpage using ASP
Here is your problem: MM_TrackoftheWolf_STRING = dsn=DSN Name;uid=User Id;pwd=Password; No space between Id;pwd Unless that is what happened when you copied and paste it Thank you, Todd Williamsen, MCSE home: 847.265.4692 Cell: 847.867.9427 -Original Message- From: Nick Boldt [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:19 PM To: [EMAIL PROTECTED] Subject: RE: Viewing table data in a webpage using ASP Here is the connection code I use to view record information from a table. I'm using Dreamweaver Ultradev 4 to help with some of the basic coding. I am using MyODBC. % MM_TrackoftheWolf_STRING = dsn=DSN Name;uid=User Id;pwd=Password; set ship_address = Server.CreateObject(ADODB.Recordset) ship_address.ActiveConnection = MM_TrackoftheWolf_STRING ship_address.Source = SELECT * FROM customershipping ship_address.CursorType = 0 ship_address.CursorLocation = 1 ship_address.LockType = 3 ship_address.Open() ship_address_numRows = 0 % % Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 ship_address_numRows = ship_address_numRows + Repeat1__numRows % Nick Boldt Computer Network Administrator Track of the Wolf Elk River, MN 55330 Tel: 763-633-2500 Fax: 763-633-2550 [EMAIL PROTECTED] -Original Message- From: Christopher R. Jones [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:07 PM To: Nick Boldt Subject: Re: Viewing table data in a webpage using ASP If you have MyODBC installed and working you should be able to view the records. I have a number of WEB pages that display MySQL data using ASP/ADO. You should send an example of you ASP script to the group to help clarify your problem. Hi, I'm trying to view the records of a table in on a webpage, but nothing is showing up. I can add records to the table from the page but cannot view, update or delete them. I'm using Windows 2000 and IIS 5.0 I'm new to MySql and would greatly appreciate any help anyone can give me. Nick Boldt Computer Network Administrator Track of the Wolf Elk River, MN 55330 Tel: 763-633-2500 Fax: 763-633-2550 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php Christopher R. Jones, P.Eng. 14 Oneida Avenue Toronto, Ontario M5J 2E3 Tel. 416 203-7465 Fax. 416 203-8249 Email [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Viewing table data in a webpage using ASP
Nick, If you are able to add records, then your connection string is correct, at least for viewing the table. Need to see the code where you actually loop through and display each record. Greg -Original Message- From: Nick Boldt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 4 December 2001 7:49 To: [EMAIL PROTECTED] Subject: RE: Viewing table data in a webpage using ASP Here is the connection code I use to view record information from a table. I'm using Dreamweaver Ultradev 4 to help with some of the basic coding. I am using MyODBC. % MM_TrackoftheWolf_STRING = dsn=DSN Name;uid=User Id;pwd=Password; set ship_address = Server.CreateObject(ADODB.Recordset) ship_address.ActiveConnection = MM_TrackoftheWolf_STRING ship_address.Source = SELECT * FROM customershipping ship_address.CursorType = 0 ship_address.CursorLocation = 1 ship_address.LockType = 3 ship_address.Open() ship_address_numRows = 0 % % Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 ship_address_numRows = ship_address_numRows + Repeat1__numRows % Nick Boldt Computer Network Administrator Track of the Wolf Elk River, MN 55330 Tel: 763-633-2500 Fax: 763-633-2550 [EMAIL PROTECTED] -Original Message- From: Christopher R. Jones [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:07 PM To: Nick Boldt Subject: Re: Viewing table data in a webpage using ASP If you have MyODBC installed and working you should be able to view the records. I have a number of WEB pages that display MySQL data using ASP/ADO. You should send an example of you ASP script to the group to help clarify your problem. Hi, I'm trying to view the records of a table in on a webpage, but nothing is showing up. I can add records to the table from the page but cannot view, update or delete them. I'm using Windows 2000 and IIS 5.0 I'm new to MySql and would greatly appreciate any help anyone can give me. Nick Boldt Computer Network Administrator Track of the Wolf Elk River, MN 55330 Tel: 763-633-2500 Fax: 763-633-2550 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php Christopher R. Jones, P.Eng. 14 Oneida Avenue Toronto, Ontario M5J 2E3 Tel. 416 203-7465 Fax. 416 203-8249 Email [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mySQLJava
Hello, Does any body know how I can connect Java to mySQL on Linux system? Regards Pierre - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
IRIX 6.5.4f thread problem
Description: After installing mysql-3.23.46-sgi-irix6.5-mips (precompiled binaries), and getting the safe-mysql to start the daemon successfully, I can't connect to the server. Every command I try to execute dies with the following message: ./mysqladmin: connect to server at 'localhost' failed error: 'Can't create a new thread (errno 1). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug' Any Ideas? How-To-Repeat: Fix: Submitter-Id: [EMAIL PROTECTED] Originator: Organization: Lee Marden Raytheon Systems Company Principal Software EngineerNortheast C3I Systems Advanced Modeling Simulation 50 Apple Hill Dr. (T3MJ21) Technology Section Tewksbury, MA 01876 Phone: (978) 858-9487 Fax: (978) 858-4336 Email:[EMAIL PROTECTED] Intranet: http://amasts.msd.ray.com/~lms/ MySQL support: [none | licence | email support | extended email support ] Synopsis: Can't connect to IRIX 6.5.4f server Severity: critical Priority: high Category: mysql Class: support Release: mysql-3.23.46 (Official MySQL binary) Environment: System: IRIX64 slgac1 6.5 04151556 IP19 Some paths: /usr/sbin/perl /sbin/make /usr/bin/cc Compilation info: CC='gcc' CFLAGS='-O3 -fno-omit-frame-pointer' CXX='c++' CXXFLAGS='-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' LIBC: -r-xr-xr-t1 root sys 2292724 Aug 30 1999 /lib/libc.so.1 lrwxr-xr-x1 root sys 19 Aug 30 1999 /usr/lib/libc.so - ../../lib/libc.so.1 lrwxr-xr-x1 root sys 19 Aug 30 1999 /usr/lib/libc.so.1 - ../../lib/libc.so.1 Configure command: ./configure --prefix=/usr/local/mysql '--with-comment=Official MySQL binary' --with-extra-charsets=complex --with-server-suffix= --enable-thread-safe-client --disable-shared Perl: This is perl, version 5.004_04 built for irix-n32 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To 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 in-memory configuration
Tim, I *really* want to do the same thing, and I'm currently playing with the embedded server to see if that will help me. Unfortunately even the embedded example doesn't really help much as it relies on having another 'mysqld' server process running to connect to (AFAICT). It should be possible to start your 'embedded' server using the 'skip-defaults' option (this should remove *some* of the reliance on the 'on-disk' data. I guess what we really want to do is create heap-db's rather than just heap-tables, (then create the actual user/grant tables in there). It would be nice to be able to:- Create heap-table load grants tables from state/startup file etc. If anyone knows how to create a 'true' embedded server, and can connect a client to it, please let us know. Mark -- Acronym of the day: MICROSOFT (Most Intelligent Customers Realize Our Software Only Fools Twits) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mySQLJava
At 11:12 PM +0100 12/3/01, P.Ruijters wrote: Hello, Does any body know how I can connect Java to mySQL on Linux system? Use a MySQL JDBC driver, for example, the one at: http://mmmysql.sourceforge.net/ Regards Pierre - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
Codewarrior compatible client libraries
Hello I'm currently developing a plugin interface for a development tool (www.runrev.com) which allows access to various databases including mysql on Mac, Win, Unix. However there seems to be no Codewarrior compatible client libraries for OSX..and the release data is approaching, can anybody help? Tuviah - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Error list with explanation
Hi. On Mon, Dec 03, 2001 at 03:58:42PM +0530, [EMAIL PROTECTED] wrote: Where can I find the list of errors generated by MYSQL and th explanation for the same (not the perror command). [...] I don't think that such a list exists, but I am not 100% sure. Some common errors are explained in the manual: http://www.mysql.com/doc/C/o/Common_errors.html Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
How to do similar query like Oracle using not exists
Hi, I try to do an Oralce query in mySQL insert into geoTable select '011852','HK' from dual where not exists (select * from geoTable where geoID = '011852') In Oracle, this query will check the new geoID is not exist before inserting into the table. In mySQL, I do create temporary table tmp1 select '011852' geoID, 'HK' countryName; create temporary table tmp2 select a.geoID, a.countryName from tmp1 a left join geoTable b on a.geoID = b.geoID where a.geoID is null; insert into geoTable select * from tmp2; Do anyone know mySQL has a similar function like Oracle to check NOT EXISTS or there is a better queries than what I use here. Thanks Wai Lee - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: workaround count AND the lack of subqueries
Hi. On Mon, Dec 03, 2001 at 01:22:30PM +0100, [EMAIL PROTECTED] wrote: Dear List reader and especially list writer, I usually get around the missing of subselects, but now i really don't know how to do without whats impossible at the moment.. In a rather big query involving 7 tables, one of the tables has to meet 5 conditions. Can somebody tell me how to do this within a 3.23 environment, tia. Maarten [...] e) the table has a maximum of 2 rows with X in column 2 [...] The problem is E; I want to have a max count of rows which meet the A -condition not bigger then 2 WHISH select a1.DOMAINNAME from CUSTOM_ARECORDS as a1, CUSTOM_NS as n1, CUSTOM_NS as n2 where a1.DOMEINNAME=n1.DOMEINNAME and // Point A n1.DOMEINNAME=n2.DOMEINNAME and a1.CUSTOM_ARECORDTARGET='xx.xx.36.18' // Other table and n1.CUSTOM_NAMESERVER='ns1.isp.com.' // point B and n1.CUSTOM_PRIMARY='1' // point C and n2.CUSTOM_NAMESERVER='ns2.isp.com.' // point D and ( select count(*) // point E by impossible subselect from CUSTOM_NS as sn1, where sn1.DOMAINNAME=a1.DOMAINNAME ) 3 ; WISH I have not tried it, but I think it should work if I understand you correctly: select a1.DOMAINNAME from CUSTOM_ARECORDS as a1, CUSTOM_NS as n1, CUSTOM_NS as n2, CUSTOM_NS as sn1 where a1.DOMEINNAME=n1.DOMEINNAME and n1.DOMEINNAME=n2.DOMEINNAME and a1.CUSTOM_ARECORDTARGET='xx.xx.36.18' and n1.CUSTOM_NAMESERVER='ns1.isp.com.' and n1.CUSTOM_PRIMARY='1' and n2.CUSTOM_NAMESERVER='ns2.isp.com.' and sn1.DOMAINNAME=a1.DOMAINNAME group by a1.DOMAINNAME having COUNT(a1.DOMAINNAME) 3 Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SQL dump
Just wondering if there's a built-in or distribution utility that comes with MySQL (like mysqlhotcopy) that will output a file with SQL commands to recreate a database. phpMyAdmin has a tool for doing this but I don't know if there's something else built-in already that has that functionality. - Jonathan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: SQL dump
PLEASE read the manual before posting. Have you tried mysqldump? Should be in the same directory as the other mysql binaries. /usr/local/mysql/bin on my machine, your machine may vary. j- k- On Monday 03 December 2001 14:33, Jonathan Hilgeman wrote: Just wondering if there's a built-in or distribution utility that comes with MySQL (like mysqlhotcopy) that will output a file with SQL commands to recreate a database. phpMyAdmin has a tool for doing this but I don't know if there's something else built-in already that has that functionality. -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To 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 3.23.46
Hi. On Mon, Dec 03, 2001 at 09:39:22PM +0800, [EMAIL PROTECTED] wrote: Hello, I want to know does MySQL 3.23.46 is good for work with Red Hat 6.2 ? You keep asking this question (which MySQL version to use with RH) again and again and several people already answered on the list and privately. Do you have any problem with any particular version or problems installing it? If so, stating these problems will probably help your case better. If the answer where not satisfying, please elaborate, why they don't fit your situation and refine your question. My means is the version ( 3.23.46 ) no any bug with RH 6.2 ? They have the policy to not release a version until all known bugs are either fixed or documented (http://www.mysql.com/doc/B/u/Bugs.html), if the fix would bring break too much existing stuff. Most of these are neither architecture nor distribution (i.e. RH) related. Is there a new version 3.23.47 / 48 will be producted ? If there are bugs / problems found with 3.23.46, there will be a 3.23.47 release to fix them. And so on. Bye, Benjamin. PS: You once mentioned PHP, in this case, best way to go is to compile PHP yourself, because the PHP package will depend on the pre-installed MySQL package. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Is it right to use GROUP BY in this situation.
Hi. Without the real data, it looks like the table design could use some normalization work: it seems there is too much data repeated in table d. But yes, in the situation on hand, GROUP BY is a reasonable use. Alternatively use DISTINCT, which will result in the same: SELECT DISTINCT c.c1,c.c2,d.d2 FROM c LEFT JOIN d ON c2=d1 Btw, do you really need a LEFT JOIN (i.e. you have rows in c without match in d)? Bye, Benjamin. PS: It would be easier to follow your example if it was not abstracted (column and table names). On Mon, Dec 03, 2001 at 03:25:28PM -, [EMAIL PROTECTED] wrote: [...] This is not a problem so much as checking that I am not missing something obvious, before I change the way my mind deals with this type of situation in MySQL. I have two tables Table c: +-+-+ | c1 | c2 | +-+-+ | 1 | foo | | 2 | bar | +-+-+ Table d: +-+---+---+ | d1 | d2 | d3 | +-+---+---+ | foo | red card | shop1 | | bar | blue card | shop1 | | foo | red card | shop2 | | bar | blue card | shop2 | +-+---+---+ Table d deliberately has multiple entries in d1 I want to select data from both table c and d so that I return +-+-+-_-+ | c1 | c2 | d2| +-+-+---+ | 1 | foo | red card | | 2 | bar | blue card | +-+-+---+ Basically I want the all of the data from table c but need to get some extra info e.g. descriptions from table d. Using: SELECT c.c1,c.c2,d.d2 FROM c LEFT JOIN d ON c2=d1 [...] I can GROUP BY c.c1 (unique row number) to return the results I want but I am not sure if this is the intended/best way to get this result. [...] -- [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: difficult join?
Hi. On Mon, Dec 03, 2001 at 09:30:41PM -0800, [EMAIL PROTECTED] wrote: I have the following situation Three tables 1) players 2) teams 3) team_player 'players' holds player records and player_id is auto_increment primary key 'teams' holds team records and team_id is auto_increment primary key 'team_player' is a table which holds records for which player belongs to which team That is team_player has 3 columns 1) id (auto_increment primary key) 2) team_id 3) player_id My problem is that I want to extract the record set from 'players' table for those players which do not belong to any team ie they will not have player_id in 'team_player' table. This should work: SELECT p.* FROM players p LEFT JOIN team_player tp ON tp.player=p.id WHERE tp.player IS NULL This is even documented in the fine manual: http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html Bye, Benjamin. I don't know how to write the join in the query .. if it is possible. Any help is greatly appreciated. [...] -- [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: SHOW TABLES; show nothing
Hi. I remember this beeing reported once before. The answer supposed that it was a problem with the compiler shipped with Red Hat. The mail is: http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:67476:ololjemolklapaobokil (and the next in thread). If this is indeed the case, a simple fix is to use the binary provided on www.mysql.com. Bye, Benjamin. On Tue, Dec 04, 2001 at 08:19:27AM +1300, [EMAIL PROTECTED] wrote: Hi, Try myisamchk'ing you mysql tables. Regards Quentin -Original Message- From: Gill, Vern [mailto:[EMAIL PROTECTED]] Sent: Monday, 3 December 2001 5:40 p.m. To: [EMAIL PROTECTED] Subject: SHOW TABLES; show nothing [...] mysql SHOW DATABASES; +--+ | Database | +--+ | | | | | | | | | | | | | | +--+ 7 rows in set (0.00 sec) [...] -- [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 do similar query like Oracle using not exists
Hi. On Mon, Dec 03, 2001 at 06:24:14PM -0500, [EMAIL PROTECTED] wrote: I try to do an Oralce query in mySQL insert into geoTable select '011852','HK' from dual where not exists (select * from geoTable where geoID = '011852') In Oracle, this query will check the new geoID is not exist before inserting into the table. In mySQL, I do create temporary table tmp1 select '011852' geoID, 'HK' countryName; create temporary table tmp2 select a.geoID, a.countryName from tmp1 a left join geoTable b on a.geoID = b.geoID where a.geoID is null; insert into geoTable select * from tmp2; Do anyone know mySQL has a similar function like Oracle to check NOT EXISTS or there is a better queries than what I use here. Yes, use a LEFT JOIN and check for NOT NULL in the result. This is even covered by the fine manual: http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html Btw, it is the forth hit if you feed the search engine with simply not exists (the way I got the URL). Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL ORDER BY or PHP Sort? Oops.
Hi. On Mon, Dec 03, 2001 at 06:16:26PM -0700, [EMAIL PROTECTED] wrote: The problem is, if I sort by the price field, the ordering of the series gets mixed up (since low-end models in higher-end series cost more than some higher-end models in lower-end series (confused?? I am :-) If I just sort by series, I don't get the prices in order within each series (big problem). How do you sort by series (if you don't care about price for a moment)? [...] I.e. simply list the order criteria which work seperately in the ORDER BY clause. If this is not applicable, please elaborate. [...] Also, how the series are stored would have been of interest, because this will influence how the ordering is specified. I.e. is it an ENUM or VARCHAR column or a reference to another table? If you have a hard time explaining it in words (I know I would have ;-), you may want post some excerpt of your table scheme (created with mysqldump) And if I sort by BOTH series and price, which is the logical thing to do, and which many people have kindly suggested (and which I have tried), well, it doesn't work, because the series must be sorted in a non-alphabetical way. But how do you do it for the series alone, then? You said you have that part working. Please show us the SQL query or PHP part of that alone. Bye, Benjamin. PS: not cross posted to PHP list. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mySQL++ res.size() question
Hi all ! Why do I get an unhandled exception errror in VC++ 6.0 When I try res.size()... ? This is only happening when the query is an insert or an update. 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: mySQL++ res.size() question
Hi. On Mon, Dec 03, 2001 at 08:51:27PM -0500, [EMAIL PROTECTED] wrote: Hi all ! Why do I get an unhandled exception errror in VC++ 6.0 When I try res.size()... ? This is only happening when the query is an insert or an update. It seems, because inserts and updates have no result set. Bye, Benjamin. PS: If it would be more reasonable to return 0 instead, is a different question. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mySQL++ store() return value
Hello all ! I'm creating a program that let the user do any query (select, update, insert) on a connection... But I think that when we store() the query, the function returns different values based on the type of query (insert, select..). How can I retreive the number of row updated (If it is an update or if a insert was successful) or the results (If the query was a select) ? I would like to let the user to do any query... Can you point me to some examples ? Thank you very much to take some time to read this... Mike - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
strange blob output
I'm new to mysql, so there may be a simple explanation of this that I'm not aware of. I have a field set to type blob. When viewing this field within the database, the correct text that has been inserted appears. When I pull it into a page within CFOUTPUT tags, I get a string of odd alphanumeric characters. What am I doing wrong? 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: Changing data
Okay, so if it won't work with more than one space, are thos records doomed to upper only or First letter capitalized? -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 11:10 AM To: 'Gill, Vern' Cc: '[EMAIL PROTECTED]' Subject: RE: Changing data Try the following 2 queries. UPDATE table SET name=concat(ucase(left(name,1)), lcase(SUBSTRING(name,2))); UPDATE table SET name=concat(left(name, INSTR(name, ' ')), ucase(mid(name,INSTR(name, ' ')+1,1)), substring(name FROM INSTR(name, ' ')+2)) WHERE INSTR(name, ' ') 0; The first query will capitalize the first letter of every entry and make the rest lower case. The second query will find the first blank, then capitalize the proceeding letter. Note that for names that have more than one space in them (PRO SPORTS TEAM), this won't work. But you can find those records that have more than one space in them by running THIS query: SELECT * FROM table WHERE name REGEXP .* .* .* - Jonathan -Original Message- From: Gill, Vern [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 10:45 AM To: 'Jonathan Hilgeman' Subject: RE: Changing data Cool. Thank everyone for help with that. Now, one more question; Can I use MySQL to change the data's case? I.E.; PROS TEAM - Pros Team PINEAPPLES - Pineapples RAPID PRINTING - Rapid Printing -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 8:27 AM To: 'Gill, Vern'; '[EMAIL PROTECTED]' Subject: RE: Changing data Try this query: UPDATE table SET phone = concat((,left(phone,3),) ,mid(phone,3,3),-,mid(phone,6,4)); It should convert 00 to (000) 000-. Take a look at this page if you want details on how it works: http://www.mysql.com/doc/S/t/String_functions.html - Jonathan -Original Message- From: Gill, Vern [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:23 AM To: '[EMAIL PROTECTED]' Subject: Changing data how would I change in all rows data that is; 00 to 000-000- or (000) 000- Can this even be done with mysql? Thank you in advance... Vern H. Gill State Director Director of Marketing Conejo Valley Jaycees http://www.conejovalleyjaycees.org - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Load data infile
Be struggling with this all day, try to figure out why when using the 'load data infile..' all it loads is the first line for the text file and that's it! Table structure: CREATE TABLE `retailtag` ( `prodid` smallint(4) NOT NULL default '0', `tagnumber` varchar(10) NOT NULL default '', `code` varchar(10) NOT NULL default '', UNIQUE KEY `tagnumber` (`tagnumber`,`code`), KEY `prodid` (`prodid`) ) TYPE=MyISAM; QUERY: $mysql load data local infile '/home/tracerta/tmp/retailtag.txt' into table retailtag fields terminated by '|' lines terminated by '\n'; the text file is contructed as such: ID|NUM|CODE ID|NUM|CODE ID|NUM|CODE etc approx., 1600 records But it only grabs the file line, and stops. I've tried it with a CSV format, and TAB format, still the same thing, grabs the first line, and that's it?? is the file in the wrong format?? thx's mysql database sql 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: SHOW TABLES; show nothing
Well, according to several subsequent messages, including http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:msn:67549:ololjemolklapaobokil; that does NOT appear to be the problem, as it also happens on other distros, with other environments and compilers... Any ideas from any MySQL developers listening? -Original Message- From: Benjamin Pflugmann [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 4:22 PM To: Quentin Bennett Cc: 'Gill, Vern'; [EMAIL PROTECTED] Subject: Re: SHOW TABLES; show nothing Hi. I remember this beeing reported once before. The answer supposed that it was a problem with the compiler shipped with Red Hat. The mail is: http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:67476:ololjemolklapaobokil (and the next in thread). If this is indeed the case, a simple fix is to use the binary provided on www.mysql.com. Bye, Benjamin. On Tue, Dec 04, 2001 at 08:19:27AM +1300, [EMAIL PROTECTED] wrote: Hi, Try myisamchk'ing you mysql tables. Regards Quentin -Original Message- From: Gill, Vern [mailto:[EMAIL PROTECTED]] Sent: Monday, 3 December 2001 5:40 p.m. To: [EMAIL PROTECTED] Subject: SHOW TABLES; show nothing [...] mysql SHOW DATABASES; +--+ | Database | +--+ | | | | | | | | | | | | | | +--+ 7 rows in set (0.00 sec) [...] -- [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
start MySQL on RedHat problem
I never run mySQL on this Linux box before and now it keep saying that error: 'Access denied for user: 'root@localhost' (Using password: YES)' when I try to run mysql or run mysqladmin, now to reset the password ? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: start MySQL on RedHat problem
Tri Tran wrote: I never run mySQL on this Linux box before and now it keep saying that error: 'Access denied for user: 'root@localhost' (Using password: YES)' when I try to run mysql or run mysqladmin, now to reset the password ? Hello, run mysqladmin -u root password '' -p (as root) ! Edward. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Changing data
Hi, I am puzzled not to see a funciton like initcap of oracle in mysql. Perhaps it is already there. Here is on (ugly) work around : Update table set name = replace(replace(replace(replace(replace(replace(replace(replace(replace( replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace (replace(replace(replace(replace(replace(replace(concat(ucase(left(name,1)), lcase(substring(name,2))),' a',' A'),' b',' B'),' c', ' C'),' d', ' D'), ' e', ' E'),' f', ' F'),' g', ' G'),' h', ' H'),' i', ' I'),' j', ' J'),' k', ' K'), ' l', ' L'),' m', ' M'),' n', ' N'),' o', ' O'),' p', ' P'),' q', ' Q'),' r', ' R'), ' s', ' S'),' t', ' T'),' u', ' U'),' v', ' V'),' w', ' W'),' x', ' X'),' y', ' Y'), ' z', ' Z'); This will handle any number of words in name as well as any number of successive spaces. I am sorry if it seems too ugly. Anvar. At 08:03 PM 03/12/2001 -0800, you wrote: Okay, so if it won't work with more than one space, are thos records doomed to upper only or First letter capitalized? -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 11:10 AM To: 'Gill, Vern' Cc: '[EMAIL PROTECTED]' Subject: RE: Changing data Try the following 2 queries. UPDATE table SET name=concat(ucase(left(name,1)), lcase(SUBSTRING(name,2))); UPDATE table SET name=concat(left(name, INSTR(name, ' ')), ucase(mid(name,INSTR(name, ' ')+1,1)), substring(name FROM INSTR(name, ' ')+2)) WHERE INSTR(name, ' ') 0; The first query will capitalize the first letter of every entry and make the rest lower case. The second query will find the first blank, then capitalize the proceeding letter. Note that for names that have more than one space in them (PRO SPORTS TEAM), this won't work. But you can find those records that have more than one space in them by running THIS query: SELECT * FROM table WHERE name REGEXP .* .* .* - Jonathan -Original Message- From: Gill, Vern [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 10:45 AM To: 'Jonathan Hilgeman' Subject: RE: Changing data Cool. Thank everyone for help with that. Now, one more question; Can I use MySQL to change the data's case? I.E.; PROS TEAM - Pros Team PINEAPPLES - Pineapples RAPID PRINTING - Rapid Printing -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 8:27 AM To: 'Gill, Vern'; '[EMAIL PROTECTED]' Subject: RE: Changing data Try this query: UPDATE table SET phone = concat((,left(phone,3),) ,mid(phone,3,3),-,mid(phone,6,4)); It should convert 00 to (000) 000-. Take a look at this page if you want details on how it works: http://www.mysql.com/doc/S/t/String_functions.html - Jonathan -Original Message- From: Gill, Vern [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:23 AM To: '[EMAIL PROTECTED]' Subject: Changing data how would I change in all rows data that is; 00 to 000-000- or (000) 000- Can this even be done with mysql? Thank you in advance... Vern H. Gill State Director Director of Marketing Conejo Valley Jaycees http://www.conejovalleyjaycees.org - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
Loading data file with MacRoman Character Encoding
Hi All, I am running Mysql version 2.23.42 on Mac OS X version 10.1. I need to upload few files in Mysql which are in MacRoman Text Encoding. My default installation does not support the MacRoman Encoding. Currently I need to convert the file into ISO-8859-1 encoding before I can run the LOAD DATA INFILE. I am doing this with a text encoding conversion utility called 'Cyclone'. It is a Cocoa Application with all fancy gui and I can not run it silently from the shell. As I move to deploy my database, I would need to upload the files at a frequency of 5 minutes. Of course, this cyclone trick is not the correct answer, even with AppleScripts. What I need to know is: A) Is there any binary for Mac OS X which supports MacRoman Encoding? Mysql AB recently released binaries for Mac OS X (3.23.45 and 3.23.46), do these versions support that? Any future plans about when it would be in place? B) I have seen in the manuals about adding custom text encoding definitions to MySQL. But I am too non-technical to be able to work on that lead. Can someone point me to helpful documents on that? This is very important for my project as everything depends on whether I can even import the data in my database efficiently or not. Thanks and Regards, Kundan Kumar - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 ORDER BY or PHP Sort?
I want to select about 25 rows from a table, and sort them by two criteria. First, by each row's Series field (Baby, Genesis, Super, Predator, Millennium are the various Series, and the order I'd like the rows in the array). Within each Series, I'd like the rows sorted by their Price field, ascending. For example: Baby $5 Baby $10 Baby $15 Genesis $20 Genesis $35 Genesis $50 ...and so on. Now, I know how to structure my MySQL Select statment such that the rows it pulls from the table will be either sorted by Price OR by Series, but not both, in the way I'd like. Does anyone know if it's possibly to do this in the Select statement itself? (I'd rather do it that way, than resort in PHP.) Thanks! ...Rene --- René Fournier [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL ORDER BY or PHP Sort? Oops.
One more thing, very important: I want to specify the Series sort order, not alphabetically, but by a non-obvious way (BabyGenesisSuperPredatorMillennium)... -- I want to select about 25 rows from a table, and sort them by two criteria. First, by each row's Series field (Baby, Genesis, Super, Predator, Millennium are the various Series, and the order I'd like the rows in the array). Within each Series, I'd like the rows sorted by their Price field, ascending. For example: Baby $5 Baby $10 Baby $15 Genesis $20 Genesis $35 Genesis $50 ...and so on. Now, I know how to structure my MySQL Select statment such that the rows it pulls from the table will be either sorted by Price OR by Series, but not both, in the way I'd like. Does anyone know if it's possibly to do this in the Select statement itself? (I'd rather do it that way, than resort in PHP.) Thanks! ...Rene --- René Fournier [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL ORDER BY or PHP Sort?
Now, I know how to structure my MySQL Select statment such that the rows it pulls from the table will be either sorted by Price OR by Series, but not both, in the way I'd like. Does anyone know if it's possibly to do this in the Select statement itself? (I'd rather do it that way, than resort in PHP.) Id I understood you wrong, then ignore this post, but any other way just use ORDER BY series,price - this works good:) Cheers Siim Einfeldt - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To 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 ORDER BY or PHP Sort? Oops.
Well I think mysql doesnt allow you to do this that simple as mysql doesnt know how you want to sort it exactly. So my suggestion would be to give a value to each series, eg. Baby = 1, Genesis=2,Super=3,Predator=4,Millennium=5 and then order by series. Cheers Siim Einfeldt One more thing, very important: I want to specify the Series sort order, not alphabetically, but by a non-obvious way (BabyGenesisSuperPredatorMillennium)... -- I want to select about 25 rows from a table, and sort them by two criteria. First, by each row's Series field (Baby, Genesis, Super, Predator, Millennium are the various Series, and the order I'd like the rows in the array). Within each Series, I'd like the rows sorted by their Price field, ascending. For example: Baby $5 Baby $10 Baby $15 Genesis $20 Genesis $35 Genesis $50 ...and so on. Now, I know how to structure my MySQL Select statment such that the rows it pulls from the table will be either sorted by Price OR by Series, but not both, in the way I'd like. Does anyone know if it's possibly to do this in the Select statement itself? (I'd rather do it that way, than resort in PHP.) Thanks! ...Rene --- Ren Fournier [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL ORDER BY or PHP Sort? Oops.
This would be pretty ugly, but you could adapt a trick that was posted to the MySQL list back in Sept. select * from ... where series != Baby, series != Genesis, series != Super, etc. Like I said, ugly, and I don't know how efficient it would be (probably not very), but it would get the job done. Otherwise, I agree with the previous post to assign a sort order number to each series type. Much cleaner, more efficient, and more flexible. On Monday, December 3, 2001, at 04:28 PM, René Fournier wrote: One more thing, very important: I want to specify the Series sort order, not alphabetically, but by a non-obvious way (BabyGenesisSuperPredator Millennium)... -- I want to select about 25 rows from a table, and sort them by two criteria. First, by each row's Series field (Baby, Genesis, Super, Predator, Millennium are the various Series, and the order I'd like the rows in the array). Within each Series, I'd like the rows sorted by their Price field, ascending. For example: Baby $5 Baby $10 Baby $15 Genesis $20 Genesis $35 Genesis $50 ...and so on. Now, I know how to structure my MySQL Select statment such that the rows it pulls from the table will be either sorted by Price OR by Series, but not both, in the way I'd like. Does anyone know if it's possibly to do this in the Select statement itself? (I'd rather do it that way, than resort in PHP.) Thanks! ...Rene --- René Fournier [EMAIL PROTECTED] David Felio Software Developer Information Network of Arkansas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To 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 ORDER BY or PHP Sort? Oops.
Hi. Because you said, Rene, that you already know how to sort according to one of both criteria, I presume ordering the series column is not the problem (e.g. because it is an enum or something alike). Then the solution would simply be to do something like SELECT * FROM my_table WHERE ... ORDER BY series, price I.e. simply list the order criteria which work seperately in the ORDER BY clause. If this is not appliable, please elaborate. Btw, it is *much* easier to help if you had quoted a (partial) working query (which include table and column names and so on). Also, how the series are stored would have been of interest, because this will influence how the ordering is specified. Also, I do not understand why you put emphasis on the fact that the series is sorted in an unusual way if you later say that you already know how to order by it?! Is this relevant to the problem at all? Bye, Benjamin. On Tue, Dec 04, 2001 at 12:36:34AM +0200, [EMAIL PROTECTED] wrote: Well I think mysql doesnt allow you to do this that simple as mysql doesnt know how you want to sort it exactly. So my suggestion would be to give a value to each series, eg. Baby = 1, Genesis=2,Super=3,Predator=4,Millennium=5 and then order by series. Cheers Siim Einfeldt One more thing, very important: I want to specify the Series sort order, not alphabetically, but by a non-obvious way (BabyGenesisSuperPredatorMillennium)... -- I want to select about 25 rows from a table, and sort them by two criteria. First, by each row's Series field (Baby, Genesis, Super, Predator, Millennium are the various Series, and the order I'd like the rows in the array). Within each Series, I'd like the rows sorted by their Price field, ascending. For example: Baby $5 Baby $10 Baby $15 Genesis $20 Genesis $35 Genesis $50 ...and so on. Now, I know how to structure my MySQL Select statment such that the rows it pulls from the table will be either sorted by Price OR by Series, but not both, in the way I'd like. Does anyone know if it's possibly to do this in the Select statement itself? (I'd rather do it that way, than resort in PHP.) Thanks! ...Rene [...] -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL ORDER BY or PHP Sort? Oops.
From: René Fournier [EMAIL PROTECTED] Date: Mon Dec 03, 2001 06:11:23 PM US/Mountain To: Benjamin Pflugmann [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Subject: Re: MySQL ORDER BY or PHP Sort? Oops. Here is the snippet of code that is presenting a challenge: --- ?php // FETCH MODELS TECH SPECS function models ($lang,$db) { $modelsheader = mysql_fetch_array(mysql_query(SELECT * FROM models WHERE lang='$lang' AND key1='header',$db)); $result = mysql_query(SELECT * FROM models WHERE key1='data' ORDER BY price ASC,$db); mysql_close(); include ('../common/models.inc'); } models($lang,$db); // CREATE A MULTI-DIMENSIONAL MODELS ARRAYS BASED ON THE NUMBER OF MODEL ROWS IN THE TABLE $i = 0; do { $allmodels[$i] = $models; $i++; } while ($models = mysql_fetch_array($result)); // NUMBER OF MODELS $first = 1; $last = sizeof($allmodels)-1; $colspan = ($last * 2)+1; ? --- The problem is, if I sort by the price field, the ordering of the series gets mixed up (since low-end models in higher-end series cost more than some higher-end models in lower-end series (confused?? I am :-) If I just sort by series, I don't get the prices in order within each series (big problem). And if I sort by BOTH series and price, which is the logical thing to do, and which many people have kindly suggested (and which I have tried), well, it doesn't work, because the series must be sorted in a non-alphabetical way. I've looked at PHP's myriad sorting functions, and well--maybe I need more sun (I live in Canada... winter...)--I can't see a 'simple' way to do a non-numerical, non-alphabetical (user-defined?) sort on the Series fields, then subsort each series by price. Many thanks for all the help, fellas. ...Rene On Monday, December 3, 2001, at 05:31 PM, Benjamin Pflugmann wrote: Hi. Because you said, Rene, that you already know how to sort according to one of both criteria, I presume ordering the series column is not the problem (e.g. because it is an enum or something alike). Then the solution would simply be to do something like SELECT * FROM my_table WHERE ... ORDER BY series, price I.e. simply list the order criteria which work seperately in the ORDER BY clause. If this is not appliable, please elaborate. Btw, it is *much* easier to help if you had quoted a (partial) working query (which include table and column names and so on). Also, how the series are stored would have been of interest, because this will influence how the ordering is specified. Also, I do not understand why you put emphasis on the fact that the series is sorted in an unusual way if you later say that you already know how to order by it?! Is this relevant to the problem at all? Bye, Benjamin. On Tue, Dec 04, 2001 at 12:36:34AM +0200, [EMAIL PROTECTED] wrote: Well I think mysql doesnt allow you to do this that simple as mysql doesnt know how you want to sort it exactly. So my suggestion would be to give a value to each series, eg. Baby = 1, Genesis=2,Super=3,Predator=4,Millennium=5 and then order by series. Cheers Siim Einfeldt One more thing, very important: I want to specify the Series sort order, not alphabetically, but by a non-obvious way (BabyGenesisSuperPredatorMillennium)... -- I want to select about 25 rows from a table, and sort them by two criteria. First, by each row's Series field (Baby, Genesis, Super, Predator, Millennium are the various Series, and the order I'd like the rows in the array). Within each Series, I'd like the rows sorted by their Price field, ascending. For example: Baby $5 Baby $10 Baby $15 Genesis $20 Genesis $35 Genesis $50 ...and so on. Now, I know how to structure my MySQL Select statment such that the rows it pulls from the table will be either sorted by Price OR by Series, but not both, in the way I'd like. Does anyone know if it's possibly to do this in the Select statement itself? (I'd rather do it that way, than resort in PHP.) Thanks! ...Rene [...] -- [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 mysql-unsubscribe- [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --- René Fournier [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: [PHP] Re: MySQL ORDER BY or PHP Sort? Oops.
You know, in spite of all the good advice I've received, I think that's what I'll have to do. I say have to because inserting another field into the table creates some complications (long story... related to the web admin tool I made for editing the tables). Actually, come to think of it, there is an existing field that I could reuse for this purpose. Yes, that will work! Thanks everyone! ...Rene On Monday, December 3, 2001, at 06:49 PM, Martin Towell wrote: can you have another field in your table(s) for a weighting and then sort on that? otherwise you'll have to use php -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 12:16 PM To: Benjamin Pflugmann; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Re: MySQL ORDER BY or PHP Sort? Oops. From: René Fournier [EMAIL PROTECTED] Date: Mon Dec 03, 2001 06:11:23 PM US/Mountain To: Benjamin Pflugmann [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Subject: Re: MySQL ORDER BY or PHP Sort? Oops. Here is the snippet of code that is presenting a challenge: --- ?php // FETCH MODELS TECH SPECS function models ($lang,$db) { $modelsheader = mysql_fetch_array(mysql_query(SELECT * FROM models WHERE lang='$lang' AND key1='header',$db)); $result = mysql_query(SELECT * FROM models WHERE key1='data' ORDER BY price ASC,$db); mysql_close(); include ('../common/models.inc'); } models($lang,$db); // CREATE A MULTI-DIMENSIONAL MODELS ARRAYS BASED ON THE NUMBER OF MODEL ROWS IN THE TABLE $i = 0; do { $allmodels[$i] = $models; $i++; } while ($models = mysql_fetch_array($result)); // NUMBER OF MODELS $first = 1; $last = sizeof($allmodels)-1; $colspan = ($last * 2)+1; ? --- The problem is, if I sort by the price field, the ordering of the series gets mixed up (since low-end models in higher-end series cost more than some higher-end models in lower-end series (confused?? I am :-) If I just sort by series, I don't get the prices in order within each series (big problem). And if I sort by BOTH series and price, which is the logical thing to do, and which many people have kindly suggested (and which I have tried), well, it doesn't work, because the series must be sorted in a non-alphabetical way. I've looked at PHP's myriad sorting functions, and well--maybe I need more sun (I live in Canada... winter...)--I can't see a 'simple' way to do a non-numerical, non-alphabetical (user-defined?) sort on the Series fields, then subsort each series by price. Many thanks for all the help, fellas. ...Rene On Monday, December 3, 2001, at 05:31 PM, Benjamin Pflugmann wrote: Hi. Because you said, Rene, that you already know how to sort according to one of both criteria, I presume ordering the series column is not the problem (e.g. because it is an enum or something alike). Then the solution would simply be to do something like SELECT * FROM my_table WHERE ... ORDER BY series, price I.e. simply list the order criteria which work seperately in the ORDER BY clause. If this is not appliable, please elaborate. Btw, it is *much* easier to help if you had quoted a (partial) working query (which include table and column names and so on). Also, how the series are stored would have been of interest, because this will influence how the ordering is specified. Also, I do not understand why you put emphasis on the fact that the series is sorted in an unusual way if you later say that you already know how to order by it?! Is this relevant to the problem at all? Bye, Benjamin. On Tue, Dec 04, 2001 at 12:36:34AM +0200, [EMAIL PROTECTED] wrote: Well I think mysql doesnt allow you to do this that simple as mysql doesnt know how you want to sort it exactly. So my suggestion would be to give a value to each series, eg. Baby = 1, Genesis=2,Super=3,Predator=4,Millennium=5 and then order by series. Cheers Siim Einfeldt One more thing, very important: I want to specify the Series sort order, not alphabetically, but by a non-obvious way (BabyGenesisSuperPredatorMillennium)... -- I want to select about 25 rows from a table, and sort them by two criteria. First, by each row's Series field (Baby, Genesis, Super, Predator, Millennium are the various Series, and the order I'd like the rows in the array). Within each Series, I'd like the rows sorted by their Price field, ascending. For example: Baby $5 Baby $10 Baby $15 Genesis $20 Genesis $35 Genesis $50 ...and so on. Now, I know how to structure my MySQL Select statment such that the rows it pulls from the table will be either sorted by Price OR by Series, but not both, in the way I'd like. Does anyone know if it's possibly to do this in the Select statement itself? (I'd rather do it that way, than resort in PHP.) Thanks!