Re: how to query for the primary key?
Hi, This seems like a dumb question--sorry. Looking at my table it shows 'MUL' instead of 'PRI' like the other tables. Did I forget to code unit_id as primary? Thanks, Justin mysql show index from property_units; Regards, Sasa »mysql, select, database« - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Query
It will be very easy if your records have timestamps (automatically set to the time when the row was created). Then you could just write something like this: SELECT * from yadda where yadda_timestamp NOW(); Or, if resolution by date is enough (timestamp has MMDDHHMMSS), you could try: SELECT * from yadda where TO_DAYS(yadda_timestamp) TO_DAYS(NOW()); Good luck, Eivind query, sql - Original Message - From: Chris Kay [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 4:10 AM Subject: Query I wish to do a query and inside that I wish to grab all records That are before todays date/time Would this work? $now = date(YmdHi) Select * from yadda where 'yadda_year,yadda_month,yadda_day,yadda_hour,yadda_min' = $now -- - Chris Kay Technical Support - Techex Communications Website: www.techex.com.au Email: [EMAIL PROTECTED] Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 Platinum Channel Partner of the Year - Request DSL - Broadband for Business -- - - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
mysql row position
Hi I'm looking for a php function that will return the position of the pointer in a mysql recordset. I found mysql_data_seek, but this appears to only move the pointer, I need to get the equivalent row number for the pointer position before moving it, then return to the same position. Can anyone help? Thanks Zac - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: maybe a bug
* [EMAIL PROTECTED] In order to remove the first character '0' of the field 'number', I want to use the following sql query to select the field from my database. select right(number, if(locate('0',length(number))=1,length(number)-1,length(number))) as 'no_zero' from mydatabase order by id desc LIMIT 0, 30 locate('0',length(number))=1 will only be true when number=. Mysql can do string to number conversions automatically: mysql select '0123'+0; +--+ | '0123'+0 | +--+ | 123 | +--+ 1 row in set (0.00 sec) -- Roger sql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Use mysql binary or build my own ?
Hi list, I've got a mysql dedicated server. Some piece of hardware : SMP : 2 * Intel PIII 1 Ghz 1Go of ram Scsi - Raid 5 Hdds Linux red-hat 7.2 This system run mysql 3.23.49 (tar.gz binary from Mysql.com ). I only have one MyIsam table with around 5 Millions of records ( around 1.2 Go disk space and 100 Mo indexes ) I plan to upgrade to 3.23.51. So, this is my question : Should i use a tar.gz binary mysql version or should i build my own ? I've read mysql docs like here : http://www.mysql.com/doc/L/i/Linux.html, and i know that if i want build my own mysql i should upgrade glibc and gcc ( currently have the bad 2.96 one ). Thanks David - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql row position
Zac, what is your indicator of which row it is? If you have aprimary key for each row, why don't you just use that? You cant really determine the position of a row if you haven't determined the criteria that fixes the position, right? So, you just decide wether you will sort it alphabetically or according to a row index, then go ahead and do it... If, on the other hand, you mean you want to return the position WITHIN the selection you have gotten, you could just push the records onto an array one by one. Then the array index for each row gives away the position of the row (-1, actually). Example: $rows = array(); $query = select * from blabla; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ array_push($rows, $row); } // - now you have it all in an array variable in php - accessible like this: foreach($rows as $idx = $row) echo $idx:.$row[field_1]. - .$row[field_2]. - .$row[etc].BR\n; ... I'm not sure wether I grasp what your question really is, but perhaps this helped some? Good luck, Eivind :-) - Original Message - From: Zac Hillier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 9:58 AM Subject: mysql row position Hi I'm looking for a php function that will return the position of the pointer in a mysql recordset. I found mysql_data_seek, but this appears to only move the pointer, I need to get the equivalent row number for the pointer position before moving it, then return to the same position. Can anyone help? Thanks Zac - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: How do i connect my Java Program to a remote MYSQL
If you use org.gjt.mm.mysql.Driver of Mark Mathews and you have a TCP/IP based network: connection = DriverManager.getConnection(jdbc:mysql://HOST/DATABASE_NAME?user=USER password=PASSWORD); HOST can be: - (localhost or IP adress 127.0.0.1) for local machine; - a remote host identifier for a remote machine( ex name or IP adress); - Original Message - From: Arul [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Friday, June 14, 2002 7:41 AM Subject: How do i connect my Java Program to a remote MYSQL Hi All How do i connect to mysql on a remote machine.. Is there any client tools available Regards, -Arul sql,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
[PATCH] LOCK TABLES missing a needed check in 4.0.1
Description: Any LOCK TABLES command (both READ and WRITE), executed from a non-root MySQL user, would fail, giving a 'select command denied' error message. This showed up as Bugzilla being unable to update a bug's state, since locking the necessary tables would fail every time. Unfortunately, bandwidth limitations prevent me from building a recent snapshot of the 4.0.x branch from BitKeeper sources, as Alexander Keremidarski [EMAIL PROTECTED] suggested in a private discussion. Thus, I am unable to check whether the problem is still present in recent versions of MySQL. The 'Web access to the MySQL BitKeeper repository' link in the '1.6.4 Useful MySQL-related links' section of the MySQL manual seems not to work: Error 503: Can't find project root. How-To-Repeat: With a 4.0.1 server and client, execute the following commands: Script started on Fri Jun 14 12:04:26 2002 Setting up interactive shell params.. [roam@straylight:p6 ~]$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.0.1-alpha SSL is not in use Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql create database locktest; Query OK, 1 row affected (0.02 sec) mysql grant all on locktest.* to 'lockt'@'localhost' identified by 'lockp'; Query OK, 0 rows affected (0.03 sec) mysql use locktest; Database changed mysql create table t(id integer auto_increment not null primary key); Query OK, 0 rows affected (0.06 sec) mysql insert into t values (); Query OK, 1 row affected (0.07 sec) mysql insert into t values (); Query OK, 1 row affected (0.04 sec) mysql select * from t; ++ | id | ++ | 1 | | 2 | ++ 2 rows in set (0.00 sec) mysql quit Bye [roam@straylight:p6 ~]$ mysql -u lockt -p locktest Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10 to server version: 4.0.1-alpha SSL is not in use Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql select * from t; ++ | id | ++ | 1 | | 2 | ++ 2 rows in set (0.00 sec) mysql lock tables t write; ERROR 1142: select command denied to user: 'lockt@localhost' for table 't' mysql \q Bye [roam@straylight:p6 ~]$ exit exit Script done on Fri Jun 14 12:06:21 2002 The 'select command denied' was the one that should not have come up :) After applying the below fix, stopping, rebuilding, reinstalling and starting the server, and reconnecting to the same database: Script started on Fri Jun 14 12:12:48 2002 Setting up interactive shell params.. [roam@straylight:p6 ~]$ mysql -u lockt -p locktest Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.0.1-alpha SSL is not in use Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql select * from t; ++ | id | ++ | 1 | | 2 | ++ 2 rows in set (0.05 sec) mysql lock tables t write; Query OK, 0 rows affected (0.00 sec) mysql insert into t values (), (); Query OK, 2 rows affected (0.02 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql lock tables t read; Query OK, 0 rows affected (0.09 sec) mysql unlock tables; Query OK, 0 rows affected (0.01 sec) mysql select * from t; ++ | id | ++ | 1 | | 2 | | 3 | | 4 | ++ 4 rows in set (0.00 sec) mysql \q Bye [roam@straylight:p6 ~]$ exit exit Script done on Fri Jun 14 12:13:28 2002 As you can see, the fix allows the server to process the LOCK TABLES command successfully. Fix: The problem seems to be in sql/sql_parse.cc, in the mysql_execute_command() function. The processing of SQLCOM_LOCK_TABLES calls check_grant(), which calls table_hash_search(). It would seem that table_hash_search() attempts to search a hash that is only initialized by a check_table_access() invocation. All the other command processing blocks within mysql_execute_command() call check_table_access() before check_grant(); adding this call to the SQLCOM_LOCK_TABLES processing block fixes the problem. --- sql/sql_parse.cc.orig Thu Jun 13 17:47:19 2002 +++ sql/sql_parse.ccThu Jun 13 18:29:52 2002 @@ -2020,6 +2020,8 @@ } if (check_db_used(thd,tables) || end_active_trans(thd)) goto error; +if (check_table_access(thd, SELECT_ACL, tables)) + goto error; if (grant_option check_grant(thd,SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL,tables)) goto error; thd-in_lock_tables=1; Submitter-Id: Originator:Peter Pentchev [EMAIL PROTECTED] Organization: MySQL support: none Synopsis: [PATCH] LOCK TABLES missing a needed check in 4.0.1 Severity: serious Priority: low Category: mysql Class: sw-bug
Re: mysql row position
Eivind, Thanks for your response, perhaps if I tell you more of the story then it'll make more sense. I'm afraid I seem to have an ability for asking cryptic questions. Below is the code I'm using, it is meant to check for a list of words in a table then return the key of the words found, for the words not in the table they should be added to the table. It seems to work fine, but in a effort to make the code more efficient I realised that at present I'm walking through a lot of the recordset for each keyword. But that the majority of the recordset would be in the same order as the keywords. So if I can add a little extra code that says if the next record in the recordset is not the word I'm trying to find then walk through the recordset, if you reach the end then start at the beginning and go down-to the initial row. This should confirm that the word is not in the recordset and so needs to be added, but leave the recordset in the correct place to check the next word. However to do this I thought I would need to identify the row the recordset was presently at. Hope this makes some sense? If you have any other comments on the code to improve it or good coding practice I would appreciate your comments as I'm still new to this. Thanks Zac Code: #--create select statement for getting keywords from table $fndWrds = ''; foreach($kywrd as $val) { $fndWrds .= wrd = '$val' OR ; } #-- add test word to get a result regardless $fndWrds .= wrd = 'test'; #-- get present keywords from db $dbKy = mysql_query(SELECT ky, wrd FROM .$site_no.kywrdInd WHERE $fndWrds;); #--create kywrd index array for index to be used in update value list $indx = array(); #--create update value lists to later add record into lookup table $vlst = ''; foreach($kywrd as $key = $val) { $fnd = 0; While ($kyRw = mysql_fetch_array($dbKy)) { if($kyRw['wrd'] == $val) { $fnd = 1; $indx[$key] = $kyRw['ky']; break 1; } } #-- reset pointer of db array back to begining mysql_data_seek($dbKy, 0); #-- if not in db then add word to db then set index if($fnd == 0) { if(! mysql_query(INSERT INTO .$site_no.kywrdInd (wrd) values ('.$val.');)) echo 'Word not added'; $indx[$key] = mysql_insert_id(); } #-- check to see that each word has an index value if($indx[$key]) { #--create value list for update into lookup table $vlst .= ($compID, . $indx[$key] . , . $scr[$key] . ), ; } else { echo 'no index set for keyword, word = '.$val.' index = '.$key.'br'; } } - Original Message - From: Eivind A. Sivertsen [EMAIL PROTECTED] To: Zac Hillier [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, June 14, 2002 9:58 AM Subject: Re: mysql row position Zac, what is your indicator of which row it is? If you have aprimary key for each row, why don't you just use that? You cant really determine the position of a row if you haven't determined the criteria that fixes the position, right? So, you just decide wether you will sort it alphabetically or according to a row index, then go ahead and do it... If, on the other hand, you mean you want to return the position WITHIN the selection you have gotten, you could just push the records onto an array one by one. Then the array index for each row gives away the position of the row (-1, actually). Example: $rows = array(); $query = select * from blabla; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ array_push($rows, $row); } // - now you have it all in an array variable in php - accessible like this: foreach($rows as $idx = $row) echo $idx:.$row[field_1]. - .$row[field_2]. - .$row[etc].BR\n; ... I'm not sure wether I grasp what your question really is, but perhaps this helped some? Good luck, Eivind :-) - Original Message - From: Zac Hillier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 9:58 AM Subject: mysql row position Hi I'm looking for a php function that will return the position of the pointer in a mysql recordset. I found mysql_data_seek, but this appears to only move the pointer, I need to get the equivalent row number for the pointer position before moving it, then return to the same position. Can anyone help? Thanks Zac - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
Replication problem
Hi, I used replication as a real-time backup for months and I'am now trying to configure a two-way replication between two MySQL servers (srv1 and srv2). So, srv1 replicates from srv2 and srv2 replicates from srv1 (They are both master and slave). The One-way replication is working fine from srv1 to srv2. But often every minute, srv1 failed to replicate from srv2. Here is the message from .err file: 020614 5:37:36 Error reading packet from server: (server_errno=1159) 020614 5:38:36 Slave: Failed reading log event, reconnecting to retry, log 'srv02-bin.003' position 386 020614 5:38:36 Slave: reconnected to master '[EMAIL PROTECTED]:3306',replication resumed in log 'srv02-bin.003' at position 386 (You can see that the replication is working quite fine because the slave restarts by himself after Connect_retry secondes) According to the include/mysqld_error.h file, the error number 1159 is ER_NET_READ_INTERRUPTED. So it seems to be a network error ? The configuration is exactly the same on the two boxes (MySQL 3.23.51 compiled on mipsel linux). And the configuration options are exactly the same. Does anyone has any suggestion ? S¨¦bastien sql, 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
autoextend in 3.23.51 rpm not accepted
Hi, I just installed mysql-max 3.23.51, hoping to use innodb autoextend feature, but mysql dies when run with the following row in my.cnf: innodb_data_file_path = ibdata1:512M:autoextend;ibdata2:256M:autoextend; complaining of an unrecognized option. Thanks, Nico - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Merge tables: unexpected behaviour and mysqld crash
Hi, I'm trying to make use of the new(ish) merge table type, and am running into two problems. The first is unexpected behaviour, the second is a straight MySQL server crash. I have tested 3.23.47, 3.23.49 and 3.23.51 with similar results. Details below refer to 3.23.51. I have also tested on Darwin (MacOS X 10.1.3) and Linux (RedHat 7.3, kernel 2.4.18), with the same results. Both deal with the same query type and datasets. Example tables and data: CREATE TABLE t1 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', PRIMARY KEY (a,b) ) TYPE=MyISAM; INSERT INTO t1 VALUES (1,1); INSERT INTO t1 VALUES (2,1); CREATE TABLE t2 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', PRIMARY KEY (a,b) ) TYPE=MyISAM; INSERT INTO t2 VALUES (1,2); INSERT INTO t2 VALUES (2,2); CREATE TABLE t ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', KEY a (a,b) ) TYPE=MRG_MyISAM UNION=(t1,t2); Unexpected behaviour: mysql select max(b) from t1 where a = 1; ++ | max(b) | ++ | 1 | ++ 1 row in set (0.00 sec) mysql select max(b) from t2 where a = 1; ++ | max(b) | ++ | 2 | ++ 1 row in set (0.00 sec) mysql select max(b) from t where a = 1; ++ | max(b) | ++ | 1 | huh? ++ 1 row in set (0.00 sec) Crasher: mysql select max(b) from t1 where a = 2; ++ | max(b) | ++ | 1 | ++ 1 row in set (0.00 sec) mysql select max(b) from t2 where a = 2; ++ | max(b) | ++ | 2 | ++ 1 row in set (0.01 sec) mysql select max(b) from t where a = 2; ERROR 2013: Lost connection to MySQL server during query mysql Traceback looks like the following: pbg3$ gdb ./mysqld GNU gdb 5.0-20001113 (Apple version gdb-200) (Mon Sep 3 02:43:52 GMT 2001) (UI_OUT) Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as powerpc-apple-macos10. Reading symbols for shared libraries ... done (gdb) run Starting program: /Users/stix/tmp/mysql-3.23.51/sql/./mysqld [Switching to thread 1 (process 15018 thread 0x1903)] /Users/stix/tmp/mysql-3.23.51/sql/./mysqld: ready for connections [Switching to thread 3 (process 15018 thread 0x2403)] Program received signal EXC_BAD_ACCESS, Could not access memory. [Switching to process 15018 thread 0x2403] 0x000f6384 in myrg_rprev (info=0x777050, buf=0x778de0 ?, inx=0) at myrg_rprev.c:29 29if ((err=mi_rprev(info-current_table-table,NULL,inx))) (gdb) bt #0 0x000f6384 in myrg_rprev (info=0x777050, buf=0x778de0 ?, inx=0) at myrg_rprev.c:29 #1 0x0009fa00 in ha_myisammrg::index_prev (this=0x778d58, buf=0x778de0 ?) at ha_myisammrg.cc:115 #2 0x00096b04 in opt_sum_query (tables=0x774178, all_fields=@0x778de0, conds=0x774240) at opt_sum.cc:159 #3 0x00068e00 in mysql_select (thd=0x7738b0, tables=0x774178, fields=@0x773ac8, conds=0x774240, order=0x0, group=0x0, having=0x0, proc_param=0xfe9a00, select_options=17339392, result=0x7742b0) at sql_select.cc:330 #4 0x0004ff28 in mysql_execute_command () at sql_parse.cc:1169 #5 0x00052804 in mysql_parse (thd=0x7738b0, inBuf=0x7739cc , length=32) at sql_parse.cc:2350 #6 0x0004ef18 in do_command (thd=0x7738b0) at sql_parse.cc:834 #7 0x0004e2f8 in handle_one_connection (arg=0x777050) at sql_parse.cc:554 #8 0x7002054c in _pthread_body () Current language: auto; currently c (gdb) If I feel game, I might start digging in the source, but I figure someone should be able to see this pretty easily. Thanks, -- Paul Ripke stixpjr @ yahoo . com . au http://www.sold.com.au - SOLD.com.au - Find yourself a bargain! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: easy question
chad, Thursday, June 13, 2002, 4:59:13 PM, you wrote: ck I am sure this is an easy question but I am not thinking clearly for some ck reason. :^) ck If you set a column to auto_Increment. You do not have to put the ck auto_increment # in the insert statement to get it to be inserted. Mysql ck does this automatically. ck Is there a way to have the timestamp automatically inserted when an ck insert statement is run? The timestamp of the insert statement. If you insert into TIMESTAMP column NULL values, current date and time will be inserted. mysql create table mytime( - mytime timestamp); Query OK, 0 rows affected (0.01 sec) mysql insert into mytime values(NULL); Query OK, 1 row affected (0.01 sec) mysql select * from mytime; ++ | mytime | ++ | 20020613103946 | ++ 1 row in set (0.01 sec) ck thanks for the help, ck chad -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Core dump: date_format('%b') with corupted data
Radoslaw, Thursday, June 13, 2002, 4:03:08 PM, you wrote: RK I run mysql3.23.49/myisam with linux 2.4.18/libc2.2.5. RK Some time ago I've hardware crash. Myisamchk didn't report RK any problems but after some time mysql got SIGSEGV. [skip] Can you send me binary files of your table for testing? (not dump files) -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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! 3.23.51 for Windows is completely broken
Richard, Friday, June 14, 2002, 10:02:18 AM, you wrote: RT mysqld and msqladmin are completely nonfunctional. RT mysqladmin does not parse ANY option (hence cannot run shutdown, RT report status, etc.) RT mysqld breaks on ALMOST EVERY option in my.cnf, and aborts with RT signal 11 when run from the command line with ANY OPTION, like RT --datadir. Hmm... I have installed 3.23.51 on my Win box two days ago and it works fine for me ... Which Windows do you use? Show me the full error message. RT 3.23.49 worked fine, BTW. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: how to query for the primary key?
justin, Friday, June 14, 2002, 4:52:12 AM, you wrote: jc This seems like a dumb question--sorry. Looking at my table it shows jc 'MUL' instead of 'PRI' like the other tables. Did I forget to code jc unit_id as primary? Thanks, Justin jc mysql desc property_units; jc ++-+--+-+-++ jc | Field | Type| Null | Key | Default | Extra | jc ++-+--+-+-++ jc | unit_id| int(11) | | MUL | 0 | auto_increment | jc | property_id| int(11) | YES | | NULL|| jc | unit_detail_id | int(11) | YES | | NULL|| jc | unit_type_id | int(11) | YES | | NULL|| jc | date_available | varchar(20) | YES | | NULL|| jc ++-+--+-+-++ Please, show me the output of following: SHOW CREATE TABLE property_units; -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Date format
Chuck, Friday, June 14, 2002, 3:01:58 AM, you wrote: CPP If you have mutli-date fields, can you set one date format in mysql sql CPP statement for all fields? I have 9 date fields, that like to have the same CPP format. What do you mean one date format? MySQL stores data in certain format, f.e. '-MM-DD' for DATE column. If you want to display data in the same format, use DATE_FORMAT() function for each column. CPP Also I don't want it to work fields that have -00-, can I CPP tell not to show those? SELECT * FROM table_name WHERE date_column'-00-00 00:00:00'; -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: autoextend in 3.23.51 rpm not accepted
Nico, Friday, June 14, 2002, 1:05:13 PM, you wrote: NS Hi, I just installed mysql-max 3.23.51, hoping to use innodb autoextend feature, but mysql dies when run with the following row in my.cnf: NS innodb_data_file_path = ibdata1:512M:autoextend;ibdata2:256M:autoextend; NS complaining of an unrecognized option. Check MySQL manual. The proper syntax for innodb_data_file_path is: pathtodatafile:sizespecification;pathtodatafile:sizespecification;... ... ;pathtodatafile:sizespecification[:autoextend[:max:sizespecification]] NS Thanks, NS Nico -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 this an FAQ?
Phil, Friday, June 14, 2002, 6:14:49 AM, you wrote: PR I've been trying to select * table as a way to review a large table in PR mysql. But only 1000 rows are returned, whereas there should be about 1200 PR rows in all. Is this a limitation in mysql? Is there a configuration file PR where it can be reset to a higher value? Thanks in advance. Phil Reardon No, there is no such limitations in MySQL. Are you sure that table contains about 1200 rows? What is the result of SELECT COUNT(*) FROM table_name -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: load data infile and warnings
Oliver, Thursday, June 13, 2002, 5:39:52 PM, you wrote: OV I imported a text file and got following results: OV mysql load data local infile 'update.txt' into table PLZV lines OV terminated by '\r\n' ignore 2 lines; OV Query OK, 46658 rows affected (0.66 sec) OV Records: 46658 Deleted: 0 Skipped: 0 Warnings: 4 OV Where are the warnings stored? Warnings are not stored anywhere. OV Can I find out what went wrong during the OV import? You can put your data using SELECT INTO OUTFILE into another file and compare this file to your original file. Check also: http://www.mysql.com/doc/L/O/LOAD_DATA.html OV Oliver -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Re[2]: counting rows ...
Victoria Reznichenko writes: Hi! SM Are you using our binaries ?? Yes. SM If yes, send me a dump of the table and exact queries ... It's a strange... Seems, troubles occur when there is a fulltext index and the text column is NOT NULL. Besides, when I do CREATE .. SELECT, new table works fine ... The number of rows that appear in SELECT 8 FROM table_name doesn't depend on number of rows in the table, i.e. I have 2 table with 3 rows in each table: mysql select 8 from qq; Empty set (0.00 sec) mysql select 8 from bb; +---+ | 8 | +---+ | 8 | | 8 | | 8 | | 8 | | 8 | | 8 | | 8 | | 8 | +---+ 8 rows in set (0.00 sec) 8-[ ] Table aa contains 4 rows, but in the result I get: mysql select 8 from aa; +---+ | 8 | +---+ | 8 | | 8 | | 8 | | 8 | | 8 | +---+ 5 rows in set (0.00 sec) I attached all three tables... -- Victoria Reznichenko Thank you for your bug report, which helped us fix a bug. Here is a patch : = /mnt/hdc/Sinisa/mysql-4.0/sql/sql_select.cc 1.173 vs edited = *** /tmp/sql_select.cc-1.173-1672 Tue Jun 11 11:20:22 2002 --- edited//mnt/hdc/Sinisa/mysql-4.0/sql/sql_select.cc Fri Jun 14 14:42:01 2002 *** *** 257,263 --- 257,270 } TABLE_LIST *table; for (table=tables ; table ; table=table-next) + { join.tables++; + if (!thd-used_tables) + { + TABLE *tbl=table-table; + tbl-keys_in_use_for_query=tbl-used_keys= tbl-keys_in_use=0; + } + } } procedure=setup_procedure(thd,proc_param,result,fields,error); if (error) -- 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
update query confusion
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all I can't work out why this query is also updating a TIMESTAMP col? UPDATE news SET title = 'new title', text = 'new text' WHERE id = '4' The table is very simple: * id INT * date TIMESTAMP // this is current date when 'updating'? * title VARCHAR * text TEXT I need the date col to remain the same, what am I doing wrong? Much thanks... - -- Nick Wilson // www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9CeQ3HpvrrTa6L5oRAp4KAKCeXaGZg7U2GK9HvSvincd+hZytFgCgqG3l YZDx9hSDdpYUPRT0Yj70qc8= =Ne/Y -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: update query confusion
{snip] I can't work out why this query is also updating a TIMESTAMP col? UPDATE news SET title = 'new title', text = 'new text' WHERE id = '4' [/snip] Because, according to TFM; (http://www.mysql.com/doc/D/A/DATETIME.html) Automatic updating of the first TIMESTAMP column occurs under any of the following conditions: *The column is not specified explicitly in an INSERT or LOAD DATA INFILE statement. *The column is not specified explicitly in an UPDATE statement and some other column changes value. (Note that an UPDATE that sets a column to the value it already has will not cause the TIMESTAMP column to be updated, because if you set a column to its current value, MySQL ignores the update for efficiency.) *You explicitly set the TIMESTAMP column to NULL. HTH! Jay - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Memlock with a none root user?
Hi, we want to lock the Memory which the MySQL allocs. We use the memlock option in the my.cnf file but it wont work so we expected. Now we run the MySQL as user root (user entry in the my.cnf) and it works. In the documentation stood that running the MySQL under the root user is not good, but to lock the MySQL in memory i must do that. Is there a way that the mysql can lock the memory and using a normal mysql userid. The aim is that we dont want the mysql processes to swap on the harddisk. Here is the Version: mysql Ver 11.15 Distrib 3.23.47, for pc-linux-gnu (i686) on a SuSE 7.1 Host with 2 CPUs with 800 MHZ Intel Pentium III Thanx Stefan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 start fail - signal 11
Hi, I have a problem. I run Debian (libc6 2.2.5-6) and I am not able to start MySQL 4.0.1 I got this error log: - 020613 12:49:06 mysqld started mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked agaist is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail key_buffer_size=12288 record_buffer=126976 sort_buffer=65528 max_used_connections=0 max_connections=50 threads_connected=0 It is possible that mysqld could use up to key_buffer_size + (record_buffer + sort_buffer)*max_connections = 9411 K bytes of memory Hope that's ok, if not, decrease some variables in the equation Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... Bogus stack limit or frame pointer, fp=0xbfffe288, stack_bottom=0x7bcebb90, thread_stack=65536, aborting backtrace. Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd-query at 0x7ab0a610 is invalid pointer thd-thread_id=138067408 Successfully dumped variables, if you ran with --log, take a look at the details of what thread 138067408 did to cause the crash. In some cases of really bad corruption, the values shown above may be invalid The manual page at http://www.mysql.com/doc/C/r/Crashing.html contains information that should help you find out what is causing the crash 020613 12:49:06 mysqld ended -- I don't know what is wrong, because it woked for a long time and some time ago it stopped and makes me angry. I have Pentium IV with 256MB RAM. Thx for all. Peto --- Odchozí zpráva neobsahuje viry. Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz). Verze: 6.0.371 / Virová báze: 206 - datum vydání: 13.6.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: load data infile and warnings
At 12:52 +0200 6/14/02, Harald Fuchs wrote: In article p0511176fb92e694753f3@[192.168.0.33], Paul DuBois [EMAIL PROTECTED] writes: I imported a text file and got following results: mysql load data local infile 'update.txt' into table PLZV lines terminated by '\r\n' ignore 2 lines; Query OK, 46658 rows affected (0.66 sec) Records: 46658 Deleted: 0 Skipped: 0 Warnings: 4 Where are the warnings stored? Can I find out what went wrong during the import? If you have DBI installed so that you can run MySQL Perl scripts: http://www.kitebird.com/mysql-cookbook/ Look for the load_diag.pl note. Thanks for the interesting hint. However, there's something I don't quite understand: load_diag.pl creates a temporary table named by default _load_diag_process_id. Why don't you use a CREATE TEMPORARY TABLE load_diag instead? You would not have to mess with process IDs or DROP TABLE IF EXISTS. For MySQL 3.23. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
MySql version 4.1?
Hi All, Anyone here got a hint about release date of My sql version 4.1 ? Gracias ! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Replication problem Timeout in MySQL
Ok. So i'm a bit confused with all the timeout values. My replication process is killed because of a net_read_timeout which is 30 secondes . I think there's at least three different timeouts : net_read_timeout : The process will be killed if it doesn't receive data during net_read_timeout secs. slave_read_timeout : The replication process timeout (default 1 hour) wait_timeout : Inactivity timeout of a connection Maybe there's a lack of documentation about that. In my case, I have increase the net_read_timeout and now everything is fine. But what about the priority of timeouts ? Does the wait_timeout overwrite the net_read_timeout ? Is there a special case for System user and replication user ? Thanks by advance for any answer. Regards, S¨¦bastien sql query Hi, I used replication as a real-time backup for months and I'am now trying to configure a two-way replication between two MySQL servers (srv1 and srv2). So, srv1 replicates from srv2 and srv2 replicates from srv1 (They are both master and slave). The One-way replication is working fine from srv1 to srv2. But often every minute, srv1 failed to replicate from srv2. Here is the message from .err file: 020614 5:37:36 Error reading packet from server: (server_errno=1159) 020614 5:38:36 Slave: Failed reading log event, reconnecting to retry, log 'srv02-bin.003' position 386 020614 5:38:36 Slave: reconnected to master '[EMAIL PROTECTED]:3306',replication resumed in log 'srv02-bin.003' at position 386 (You can see that the replication is working quite fine because the slave restarts by himself after Connect_retry secondes) According to the include/mysqld_error.h file, the error number 1159 is ER_NET_READ_INTERRUPTED. So it seems to be a network error ? The configuration is exactly the same on the two boxes (MySQL 3.23.51 compiled on mipsel linux). And the configuration options are exactly the same. Does anyone has any suggestion ? S¨¦bastien sql, 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
Create database in other location ...
I'm using MySQL 4.0.1 ( Innodb) and I want to create a database 'c:\mydata\sami_d0' and log file 'c:\mylogs\sami_l0', How can i do that? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
String seem to be short
I am using the component Zeos, and when I execute the sql show create table the resultset came like that: CREATE TABLE `clientes` ( `cli_codigo_ID` int(11) NOT NULL auto_increment, `cli_nome` varchar(50) default NULL, `cli_endereco` varchar(70) default NULL, `cli_bairro` varchar(20) default NULL, `cli_cidade` varchar(20) default NULL, `cli_estado` char(2) default NULL, `cli_cep` varchar(9) default NULL, `cli_cnpj` varchar(16) default NULL, `cli_ie` varchar(15) default NULL, `cli_data_abertura` varchar(10) default NULL, `cli_socio_titular` varchar(40) default NULL, `cli_cpf_socio` varchar(Û8,wÌÚ Seem to be short, but there are any componet property to set the lenght. What Can I do in this case?? Alexander A busca mais veloz e precisa da internet. Acesse agora: http://www.zoom.com.br. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
timestamp problem ..
Heey Folks, I'm having a slight problem with the timestamp column format. When I alter a table and, add a column of type timestamp all records get the current timestamp, that's ok. When i insert a new row, all records get the current timestamp. That too is ok. But now, when I update one row of the table, that row gets a new timestamp. And that's not what i'd like it to do. Does somebody have any idea on how this can be prevented? I've tried to make the column of type int(14) and then set now() or UNIX_TIMESTAMP as default value, but that just results in a very well known error 1064 (You have an error in your SQL syntax near 'NOW()' at line 1). Thanks ! Wouter (ps. beer for the helper .. if you'd come up with some idea to give it to you) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Obscure replication error message
Description: Replication stopped on our MySQL 4.0.1-alpha distribution with the error: Error executing query '%': got error 127 from table handler. (This may not be the exact text). Note the '%', which is what this bug report is referring to. Presumably the text of the query should be there. How-To-Repeat: Unclear. Perhaps cause table corruption on master? Fix: Submitter-Id: Originator:[EMAIL PROTECTED] Organization: NewsNow Publishing Ltd MySQL support: none Synopsis: Obscure error message during replication Severity: non-critical Priority: medium Category: mysql Class: sw-bug Release: mysql-4.0.1-alpha (Source distribution) Environment: Gigabyte GS-SR101 server, 2xPIII 1GHz processors, 2G RAM, IDE hardware RAID (Promise RAID controller). Debian Linux 'testing' distribution with custom-compiled 2.4.18 kernel. System: Linux pilger 2.4.18 #1 SMP Mon Mar 25 11:16:14 GMT 2002 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4 20011002 (Debian prerelease) Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 13 Apr 18 11:08 /lib/libc.so.6 - libc-2.2.5.so -rwxr-xr-x1 root root 1153816 Mar 24 17:00 /lib/libc-2.2.5.so -rw-r--r--1 root root 2391274 Mar 24 17:00 /usr/lib/libc.a -rw-r--r--1 root root 178 Mar 24 17:01 /usr/lib/libc.so -rw-r--r--1 root root 716080 Jan 13 20:06 /usr/lib/libc-client.so.2001 Configure command: ./configure --prefix=/usr/local/mysql-3.23.49 --enable-assembler --with-raid --with-unix-socket-path=/tmp --with-innodb --with-libwrap --with-tcp-port=3306 --with-unix-socket-path=/var/run/mysql/mysqld.sock - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: timestamp problem ..
The first timestamp in any table is automatically updated by mysql every time you modify that record. It is the modify timestamp If you wish to use the timestamp in your table, you should create two timestamps at least and use the second one Modstamp timestamp Usable timestamp See here http://www.mysql.com/doc/D/A/DATETIME.html starting on the fourth paragraph I'll take my beer via air mail :) -Original Message- From: Wouter van Vliet [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 9:53 AM To: [EMAIL PROTECTED] Cc: Wouter @ Witbier Subject: timestamp problem .. Heey Folks, I'm having a slight problem with the timestamp column format. When I alter a table and, add a column of type timestamp all records get the current timestamp, that's ok. When i insert a new row, all records get the current timestamp. That too is ok. But now, when I update one row of the table, that row gets a new timestamp. And that's not what i'd like it to do. Does somebody have any idea on how this can be prevented? I've tried to make the column of type int(14) and then set now() or UNIX_TIMESTAMP as default value, but that just results in a very well known error 1064 (You have an error in your SQL syntax near 'NOW()' at line 1). Thanks ! Wouter (ps. beer for the helper .. if you'd come up with some idea to give it to you) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: update query confusion
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Jay Blanchard declared other column changes value. (Note that an UPDATE that sets a column to the value it already has will not cause the TIMESTAMP column to be updated, because if you set a column to its current value, MySQL ignores the update for efficiency.) *You explicitly set the TIMESTAMP column to NULL. HTH! Sure does, cheers Jay. - -- Nick Wilson // www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9CfkZHpvrrTa6L5oRAlgCAJ47bPK5shotAZek3a8p7Fw8ZqoyFACgq8JV 3XjDcGjY6BgrcWc0zKg35Bo= =qTFK -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
replication
i am trying to setup a slave server (3.23.50) on solaris 2.7 i follow the manual to set it up but when i start this slave server, i have the following error message from mysqld : bin/mysqld: option `--master' is ambiguous where does this --master come from thanks, Pierre -- sql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: timestamp problem ..
Wouter, Friday, June 14, 2002, 4:53:20 PM, you wrote: WvV I'm having a slight problem with the timestamp column format. When I alter a WvV table and, add a column of type timestamp all records get the current WvV timestamp, that's ok. When i insert a new row, all records get the current WvV timestamp. That too is ok. But now, when I update one row of the table, that WvV row gets a new timestamp. And that's not what i'd like it to do. Does WvV somebody have any idea on how this can be prevented? WvV I've tried to make the column of type int(14) and then set now() or WvV UNIX_TIMESTAMP as default value, but that just results in a very well known WvV error 1064 (You have an error in your SQL syntax near 'NOW()' at line 1). You can add one more TIMESTAMP column or take a look at DATETIME column and use functon NOW(): http://www.mysql.com/doc/D/A/DATETIME.html WvV Thanks ! WvV Wouter -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: update query confusion
Nick, Friday, June 14, 2002, 3:40:23 PM, you wrote: NW I can't work out why this query is also updating a TIMESTAMP col? It's a paticular feature of TIMESTAMP column. Read the manual: http://www.mysql.com/doc/D/A/DATETIME.html NW UPDATE news SET title = 'new title', text = 'new text' WHERE id = '4' NW The table is very simple: NW * id INT NW * date TIMESTAMP // this is current date when 'updating'? NW * title VARCHAR NW * text TEXT NW I need the date col to remain the same, what am I doing wrong? NW Much thanks... -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Create database in other location ...
Silmara, Friday, June 14, 2002, 4:59:15 PM, you wrote: SCB I'm using MySQL 4.0.1 ( Innodb) and I want to create a database SCB 'c:\mydata\sami_d0' and log file 'c:\mylogs\sami_l0', How can i do that? Set up options in my.cnf. Look at: http://www.mysql.com/doc/I/n/InnoDB_start.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 version 4.1?
Remy, Friday, June 14, 2002, 4:14:54 PM, you wrote: RD Anyone here got a hint about release date of My sql version 4.1 ? RD Gracias ! There is no exact date of 4.1 release. It will suddenly come before then end of the year. :) -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: timestamp problem ..
This is exactly what timestamp columns are supposed to do - see http://www.mysql.com/doc/D/A/DATETIME.html The first timestamp column in the table will be automatically updated upon insert/update. Your choices are: (1) Change to datetime type. Then, on insert, insert the current date via now(). It will not be updated unless you specifically change it. (2) Add a second timestamp column; only the FIRST timestamp column is updated as in (1) above. See the docs for mor info. (3) Keep the column type as timestamp, but always explicitly insert the desired date/time - that way, the value won't be automatically set. This is probably the least desireable option, though. If I were me, I'd go with (1). Or, depending on your needs, a combination of timestamp datetime columns. Now about that beer... ;) -steve At 3:53 PM +0200 6/14/02, Wouter van Vliet wrote: Heey Folks, I'm having a slight problem with the timestamp column format. When I alter a table and, add a column of type timestamp all records get the current timestamp, that's ok. When i insert a new row, all records get the current timestamp. That too is ok. But now, when I update one row of the table, that row gets a new timestamp. And that's not what i'd like it to do. Does somebody have any idea on how this can be prevented? I've tried to make the column of type int(14) and then set now() or UNIX_TIMESTAMP as default value, but that just results in a very well known error 1064 (You have an error in your SQL syntax near 'NOW()' at line 1). Thanks ! Wouter (ps. beer for the helper .. if you'd come up with some idea to give it to you) -- ++ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | ++ | If only life would imitate toys. | | - Ted Raimi, March 2002 | | - http://www.whoosh.org/issue67/friends67a.html#raimi | ++ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: timestamp problem ..
whow, this list is so very powerfull .. just give me your address and I'll send you the beer .. what kind of it would you like? -Oorspronkelijk bericht- Van: Luc Foisy [mailto:[EMAIL PROTECTED]] Verzonden: June 14, 2002 16:04 Aan: Wouter van Vliet; MYSQL-List (E-mail) Onderwerp: RE: timestamp problem .. The first timestamp in any table is automatically updated by mysql every time you modify that record. It is the modify timestamp If you wish to use the timestamp in your table, you should create two timestamps at least and use the second one Modstamp timestamp Usable timestamp See here http://www.mysql.com/doc/D/A/DATETIME.html starting on the fourth paragraph I'll take my beer via air mail :) -Original Message- From: Wouter van Vliet [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 9:53 AM To: [EMAIL PROTECTED] Cc: Wouter @ Witbier Subject: timestamp problem .. Heey Folks, I'm having a slight problem with the timestamp column format. When I alter a table and, add a column of type timestamp all records get the current timestamp, that's ok. When i insert a new row, all records get the current timestamp. That too is ok. But now, when I update one row of the table, that row gets a new timestamp. And that's not what i'd like it to do. Does somebody have any idea on how this can be prevented? I've tried to make the column of type int(14) and then set now() or UNIX_TIMESTAMP as default value, but that just results in a very well known error 1064 (You have an error in your SQL syntax near 'NOW()' at line 1). Thanks ! Wouter (ps. beer for the helper .. if you'd come up with some idea to give it to you) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
pointless question
in the manual: |6.2.6.2 Storage requirements for date and time types | |Column type Storage required |DATE 3 bytes |DATETIME 8 bytes |TIMESTAMP 4 bytes |TIME 3 bytes |YEAR 1 byte so, does datetime do more then date + time? datetime = 8 bytes, date + time = 6 bytes its really a pointless question, but just something that caught my attention while i was looking for something else. -- mysql, sql, 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
Max in query
Is there a way to obtain max (or min) value in a query? Example: i want to know the last id in mytable table is there a way to do this query? something like select id from mytable where id = max; or something else? The one i wrote i tried it but it does not work. Thank you Claudio - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: How do i connect my Java Program to a remote MYSQL
Arul wrote: Hi All How do i connect to mysql on a remote machine.. Is there any client tools available Regards, -Arul sql,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 Use a JDBC Driver like MM.MySQL from http://mmmysql.sourceforge.net/ -Mark - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Max in query
[snip] Is there a way to obtain max (or min) value in a query? Example: i want to know the last id in mytable table is there a way to do this query? something like select id from mytable where id = max; or something else? [/snip] Try -- select MAX(id) from mytable; HTH! Jay sql, mysql, query captain, my captain, query rhythm is a wonderful thing - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Seem to be short
Sorry, but I had a problem with my e-mail. Anybody can help me?? please Alexander I am using the component Zeos, and when I execute the sql show create table the resultset came like that: CREATE TABLE `clientes` ( `cli codigo ID` int(11) NOT NULL auto increment, `cli nome` varchar(50) default NULL, `cli endereco` varchar(70) default NULL, `cli bairro` varchar(20) default NULL, `cli cidade` varchar(20) default NULL, `cli estado` char(2) default NULL, `cli cep` varchar(9) default NULL, `cli cnpj` varchar(16) default NULL, `cli ie` varchar(15) default NULL, `cli data abertura` varchar(10) default NULL, `cli socio titular` varchar(40) default NULL, `cli cpf socio` varchar(Û8,wÌÚ Seem to be short, but there are any componet property to set the lenght. What Can I do in this case?? Alexander -- __ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup Save up to $160 by signing up for NetZero Platinum Internet service. http://www.netzero.net/?refcd=N2P0602NEP8 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: pointless question (Pointless Answer)
It's easier (as in less typing) to sort by one field than two. =C= * * Cal Evans * Techno-Mage * http://www.calevans.com * - Original Message - From: Ray [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 9:23 AM Subject: pointless question in the manual: |6.2.6.2 Storage requirements for date and time types | |Column type Storage required |DATE 3 bytes |DATETIME 8 bytes |TIMESTAMP 4 bytes |TIME 3 bytes |YEAR 1 byte so, does datetime do more then date + time? datetime = 8 bytes, date + time = 6 bytes its really a pointless question, but just something that caught my attention while i was looking for something else. -- mysql, sql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySql version 4.1?
Remy Dufour [EMAIL PROTECTED] wrote: Anyone here got a hint about release date of My sql version 4.1 ? It was metioned on the mysql-bugs list today: Alpha version of 4.1 should come out this year. -- Mr. Sinisa Milivojevic [EMAIL PROTECTED] -- ./ premax ./ [EMAIL PROTECTED] ./ koniec i bomba, a kto czytal ten traba. w.g. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 column to auto-increment
I have a table whose key is currently a regular int. I am manually incrementing it using a second table. If I alter the column type to auto-increment will the next insert find the current highest number and increment that or do I need to do something more? [mysql - sql] -- Pollution is a result of immature technology. Pollution is waste and ignorance. The faster the economic growth rate, the faster pollution levels decline. --- Greg Rehmke Rick Pasotto[EMAIL PROTECTED]http://www.niof.net - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Creating Tables/Keys from PowerDesigner Sql
I generated an SQL script of my datamodel in PowerDesigner which I'd like to import into mySql to create my tables, keys, etc. How do I accomplish this? Thanks, Jason E. Brawner - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
A simple query, please help
My table is as follows: Value Distance (float) (float) 2.0 42.3 1.0 56.9 3.2 20.0 1.3 18.5 I issued a query, 'update table set value=4.0 where distance=42.3' But this doesn't work. This works fine with the values 20.0 and 18.5 and doesn't work with the values 42.3 and 56.9. The problem, I discerned, was with the floating point comparison. Works fine with the rounded figures like, 20.0 and 18.5, while doesn't work with others. Is this the reason? In case yes, how do I solve the problem? I've tried creating the distance column with an explicitly specified precision. But doesn't work that way either. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
executemany UPDATE (MySQL Python)
Can anyone confirm that it is *not* possible to pass a list to the Python MySQLdb module in UPDATE operations? In other words, this kind of thing works: self.dbh.execute(INSERT INTO Foo (blah, blorg,snork) VALUES (%s,%s,%s),myList) ... But this kind doesn't appear to work for me: self.dbh.execute(UPDATE Foo SET blah=%s, blorg=%s WHERE snork=%s,myList) Doing the latter with a loop in Python is much slower than I'd expect that doing it with a list would be. Nick -- [EMAIL PROTECTED] (408) 904-7198 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
help with query
I am trying to get something like the following: Title - topic #1 sub topic #1.1 topic #2 sub topic #2.1 sub topic #2.2 from the following table (I am using php for scripting). forum id int parent_id int (refers to the forum.id field) title ... How can I get the above output in the correct order since the posts into the table can come in any order? I have tried various order by's and group by's. I am so lost on this. Thanks in Advance, Scott Hathaway query, sql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Foreign Key Question
I am using MySql-3.23.51. Even though this version doesn't support foreign keys, the foreign key declarations can be entered without getting an error message. I would like to write CREATE TABLE statements that include foreign key declarations that would be compatible with future releases that will support them. The goal is to write the SQL once, without the need to change it later on. Would the following statements be correct in the current version of MySql as well as version 4.1? create table orders ( orderID int not null auto_increment, date date not null, amount double(6,2), primary key(orderID) ); create table orderItems ( orderID int not null, quantity smallint not null, partNo int not null, key(orderID), foreign key(orderID) references orders(orderID) ); __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.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: A simple query, please help
select version(); show create table ...; - Original Message - From: Vandana [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 7:01 PM Subject: A simple query, please help My table is as follows: Value Distance (float) (float) 2.0 42.3 1.0 56.9 3.2 20.0 1.3 18.5 I issued a query, 'update table set value=4.0 where distance=42.3' But this doesn't work. This works fine with the values 20.0 and 18.5 and doesn't work with the values 42.3 and 56.9. The problem, I discerned, was with the floating point comparison. Works fine with the rounded figures like, 20.0 and 18.5, while doesn't work with others. Is this the reason? In case yes, how do I solve the problem? I've tried creating the distance column with an explicitly specified precision. But doesn't work that way either. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: A simple query, please help (solved)
Thanks a lot, it worked with the double datatype! On Fri, 14 Jun 2002, Michael Ivanyo wrote: I've had similar problems with this in my career and have come to the conclusion that one should always use double floats. The problem is typically due to round off errors of the float type. The extra bytes of the double type should resolve the problem. --Michael --- Vandana [EMAIL PROTECTED] wrote: My table is as follows: Value Distance (float) (float) 2.0 42.3 1.0 56.9 3.2 20.0 1.3 18.5 I issued a query, 'update table set value=4.0 where distance=42.3' But this doesn't work. This works fine with the values 20.0 and 18.5 and doesn't work with the values 42.3 and 56.9. The problem, I discerned, was with the floating point comparison. Works fine with the rounded figures like, 20.0 and 18.5, while doesn't work with others. Is this the reason? In case yes, how do I solve the problem? I've tried creating the distance column with an explicitly specified precision. But doesn't work that way either. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.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
Is the order same?
When I say 'select * from table', can I always be assured of the order in which the results are retrieved. If I issue the query a second time, (assuming no new insertions on the table), will I get the results in the same order, again? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 the order same?
[snip] When I say 'select * from table', can I always be assured of the order in which the results are retrieved. If I issue the query a second time, (assuming no new insertions on the table), will I get the results in the same order, again? [/snip] Yes. Data is always sorted from first entered to last entered unless you change the sort with an ORDER BY or GROUP BY. HAGW! Jay sql, mysql, 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
Romanian translation of error messages
This is the full romanian translation of the error messages from the MySQL version included in RedHat 7.2. I belive the version is: Ver 11.15 Distrib 3.23.41 from the Linux RedHat 7.2 RedHat put the file errmsg.txt in the folder /usr/share/mysql/romanian/ The messages were translated in romanian up to the line 182. I continued the translation from line 183(You are using safe update mode) to the end of the file. I hope this will help you. If you have something to translate form english to romanian (1-2 pages) send an email.There are romanian specific characters not present in the standard characters of the linux. In what character set must I save the files? My name is Stefanescu Adrian. e-mail: [EMAIL PROTECTED] the source is of the file is: /* Copyright Abandoned 1997 TCX DataKonsult AB Monty Program KB Detron HB This file is public domain and comes with NO WARRANTY of any kind Translated into Romanian by Stefan Saroiu e-mail: [EMAIL PROTECTED] */ hashchk, isamchk, NU, DA, Nu pot sa creez fisierul '%-.64s' (Eroare: %d), Nu pot sa creez tabla '%-.64s' (Eroare: %d), Nu pot sa creez baza de date '%-.64s'. (Eroare: %d), Nu pot sa creez baza de date '%-.64s'. Baza de date exista deja, Nu pot sa drop baza de date '%-.64s'. Baza da date este inexistenta, Eroare dropuind baza de date (nu pot sa sterg '%-.64s', Eroare: %d), Eroare dropuind baza de date (nu pot sa rmdir '%-.64s', Eroare: %d), Eroare incercind sa delete '%-.64s' (Eroare: %d), Nu pot sa citesc cimpurile in tabla de system (system table), Nu pot sa obtin statusul lui '%-.64s' (Eroare: %d), Nu pot sa obtin directorul current (working directory) (Eroare: %d), Nu pot sa lock fisierul (Eroare: %d), Nu pot sa deschid fisierul: '%-.64s'. (Eroare: %d), Nu pot sa gasesc fisierul: '%-.64s' (Eroare: %d), Nu pot sa citesc directorul '%-.64s' (Eroare: %d), Nu pot sa schimb directorul '%-.64s' (Eroare: %d), Cimpul a fost schimbat de la ultima citire a tabelei '%-.64s', Hard-disk-ul este plin (%s). Astept sa se elibereze ceva spatiu, Nu pot sa scriu (can't write), cheie duplicata in tabela '%-.64s', Eroare inchizind '%-.64s' (errno: %d), Eroare citind fisierul '%-.64s' (errno: %d), Eroare incercind sa renumesc '%-.64s' in '%-.64s' (errno: %d), Eroare scriind fisierul '%-.64s' (errno: %d), '%-.64s' este blocat pentry schimbari (loccked against change), Sortare intrerupta, View '%-.64s' nu exista pentru '%-.64s', Eroarea %d obtinuta din handlerul tabelei, Handlerul tabelei pentru '%-.64s' nu are aceasta optiune, Nu pot sa gasesc recordul in '%-.64s', Informatie incorecta in fisierul: '%-.64s', Cheia fisierului incorecta pentru tabela: '%-.64s'. Incearca s-o repari, Cheia fisierului e veche pentru tabela '%-.64s'; Repar-o!, Tabela '%-.64s' e read-only, Out of memory. Porneste daemon-ul din nou si incearca inca o data (e nevoie de %d bytes), Out of memory pentru sortare. Largeste marimea buffer-ului pentru sortare in daemon (sort buffer size), Sfirsit de fisier neasteptat in citirea fisierului '%-.64s' (errno: %d), Prea multe conectiuni, Out of memory; Verifica daca mysqld sau vreun alt proces foloseste toate memoria disponbila. Altfel, trebuie sa folosesi 'ulimit' ca sa permiti lui memoria disponbila. Altfel, trebuie sa folosesi 'ulimit' ca sa permiti lui mysqld sa foloseasca mai multa memorie ori adauga mai mult spatiu pentru swap (swap space), Nu pot sa obtin hostname-ul adresei tale, Prost inceput de conectie (bad handshake), Acces interzis pentru utilizatorul: '%-.32s@%-.64s' la baza de date '%-.64s', Acces interzis pentru utilizatorul: '%-.32s@%-.64s' (Folosind parola: %s), Nici o baza de data nu a fost selectata inca, Comanda invalida, Coloana '%-.64s' nu poate sa fie null, Baza de data invalida '%-.64s', Tabela '%-.64s' exista deja, Tabela '%-.64s' este invalida, Coloana: '%-.64s' in %-.64s este ambigua, Terminarea serverului este in desfasurare, Coloana invalida '%-.64s' in '%-.64s', '%-.64s' nu exista in clauza GROUP BY, Nu pot sa grupez pe (group on) '%-.64s', Comanda are functii suma si coloane in aceeasi comanda, Numarul de coloane nu este acelasi cu numarul valoarei, Numele indentificatorului '%-.100s' este prea lung, Numele coloanei '%-.64s' e duplicat, Numele cheiei '%-.64s' e duplicat, Cimpul '%-.64s' e duplicat pentru cheia %d, Specificandul coloanei '%-.64s' este incorect, %s linga '%-.80s' pe linia %d, Query-ul a fost gol, Tabela/alias: '%-.64s' nu este unic, Valoarea de default este invalida pentru '%-.64s', Chei primare definite de mai multe ori, Prea multe chei. Numarul de chei maxim este %d, Prea multe chei. Numarul de chei maxim este %d, Cheia specificata este prea lunga. Marimea maxima a unei chei este de %d, Coloana cheie '%-.64s' nu exista in tabela, Coloana de tip BLOB '%-.64s' nu poate fi folosita in specificarea cheii cu tipul de tabla folosit, Lungimea coloanei '%-.64s' este prea lunga (maximum = %d). Foloseste BLOB mai bine, Definitia tabelei este incorecta; Nu pot fi mai mult de o singura
Creating Tables/Keys from PowerDesigner Sql
I generated an SQL script of my datamodel in PowerDesigner which I'd like to import into mySql to create my tables, keys, etc. How do I accomplish this? Thanks, Jason E. Brawner - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: undefined symbol: _dig_vec
I'm sorry for bugging you, but I don't have the .profile file. I have the .bashrc, .bash_profile, .bash_logout files. My shell is bash. What do I do now? Hoa From: Bhavin Vyas [EMAIL PROTECTED] To: Hoa Doan [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: undefined symbol: _dig_vec Date: Thu, 13 Jun 2002 16:09:40 -0700 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib. Put this in your .profile file or the global .profile file so that it's executed evertime you log in. - Original Message - From: Hoa Doan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, June 13, 2002 11:34 AM Subject: Re: undefined symbol: _dig_vec Thanks for you help so far. I do have the libodbcinst.so.1. It's located in the directory /usr/local/lib, but the program doesn't know that. How do I make it see that libodbcinst.so.1 is in /usr/local/lib? -Hoa From: Bhavin Vyas [EMAIL PROTECTED] To: Hoa Doan [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: undefined symbol: _dig_vec Date: Wed, 12 Jun 2002 21:54:08 -0700 You will have to get libodbcinst.so.1. This library file is needed by libmyodbc.so. You should be able to download it from the net. Here is one link that might help http://www.slac.stanford.edu/grp/eg/minos/external/installation/lib/libodbc i nst.so.1 - Original Message - From: Hoa Doan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, June 12, 2002 6:38 PM Subject: Re: undefined symbol: _dig_vec So I ldd /usr/local/MyODBC/lib/libmyodbc.so and this is the result: libodbcinst.so.1 = not found libz.so.1 = /usr/lib etc... I did a find on libodbcinst.so.1 and found it in /usr/local/lib. What do I do from here? Hoa From: Bhavin Vyas [EMAIL PROTECTED] To: Hoa Doan [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: undefined symbol: _dig_vec Date: Wed, 12 Jun 2002 18:15:53 -0700 if you have the file /usr/local/MyODBC/lib/libmyodbc.so, then do ldd /usr/local/MyODBC/lib/libmyodbc.so and see if all the dependencies are satisfied. Regards, Bhavin. - Original Message - From: Hoa Doan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 12, 2002 11:52 AM Subject: undefined symbol: _dig_vec Hi, I'm using the unixODBC driver manager and MyODBC driver and trying to connect to my clients database on the MySQL server. But it can't connect. This is the message I get: Can't open lib /usr/local/MyODBC/lib/libmyodbc.so : undefined symbol: _dig_vec How do I fix this? -Hoa _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check:
Re: help with query
I think the best way to do this is to set up two tables. One for the main topic list, then one for each sub topic. You may already have this but I cant see it here. Anyways to get your selection order correct you could do something like:SELECT * FROM forum ORDER BY parent_id, id Have any exampls of what you tried? And what exactly didnt work or turn out right?-Nick I am trying to get something like the following: Title - topic #1 sub topic #1.1 topic #2 sub topic #2.1 sub topic #2.2 from the following table (I am using php for scripting). forum idint parent_id int (refers to the forum.id field) title ... How can I get the above output in the correct order since the posts into the table can come in any order? I have tried various order by's and group by's. I am so lost on this. Thanks in Advance, Scott Hathaway query, sql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
run-all-tests time
Just a quick question on how long this bench mark usually runs for. Started it a while ago and its still kicking away. Know its working because the Questions number keeps on going up.Thanks for the info. -Nick p.s. System is w2k 2gig Intel 4 with 512 ram filter fodder: sql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Syntax dilemma
On Wed, 1969-12-31 at 21:59, Ricardo Fitzgerald wrote: Hi, I'm having trouble trying to insert form data into a mysql db, the thing is my client wants table data to be splitted, I mean some data comes from the first form, and the rest from another form. Hi Ricardo! Why not use a session to store the query data until it is needed for your insert? For more information on sessions and PHP, visit http://php.net/session Also, here are a few tips: ... // SQL query insert all data into a table $query = insert into RegistroPersonas values ('.NULL.','.$nombre.', '.$apellido.', '.NULL.', '.$direccion.', '.$ciudad.', '.NULL.', '.NULL.', '.$pais.', '.$telefono.', '.$fax.', '.$email.', '.$login_usuario.', '.$clave.', '.$fecha_nac.', '.NULL.', '.NULL.' '.$sexo.', '.NULL.', '.NULL.', '.NULL.', '.NULL.' ); You can specify the column names for an insert - you (likely) do not need to use an explicit NULL! (Also, the NULL used in MySQL is not the same value as the NULL used in PHP. NULL in PHP evaluates to an empty string when used in a string context.) You can also use a simpler style of quoting to make your query easier to read. For example: $query = INSERT INTO RegistroPersonas column_one, column_four, column_seven, column_eight VALUES (1, 'FOUR', $enter-$some-$variables, 8); My problem is NOTHING gets inserted !!! I filled all empty fields with NULL values It connects to the db but does nothing else // Do query $result = mysql_query($query); // this script has a form at the end, where the remaining fields are // filled // and calls the next script, where the tables are altered // there and the empty fields filled with the values retrieved I suppose to use Update in the next script , to enter remaining data, but I'm not sure because the first field auto increments, and is the primary key. Use mysql_insert_id() in PHP to find the number of the last generated auto increment. Good Luck! -- __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Zak Greant [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Advocate /_/ /_/\_, /___/\___\_\___/ Calgary, Canada ___/ 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
C API row data not matching database data
I'm using the C API to return a record which has a field that contains (somewhat) binary data. It's been properly mysql_escape_string()ed. I'm using a 3.23.4x server client. When I do a: select data into outfile 'out' from table where id='1'; from the mysql client, I get what I expect in the outfile. When I do a mysql_fetch_row() and a row[0] on the same query from within the C API, I get similar but completely different data. The former is ~1800 bytes long, and the latter ~6200 bytes long. Incidentally the data in the outfile contains a good number of the two char sequence 0x91 0x11, but in the C program, it all comes out as 0xCD Anyway, at the end of the data is a plain text sequence that I am trying to extract. I can find it ok, IF the data were there. The CAPI doesn't show it, and that is my major problem. No 0x00s exist in the datastream. I'm really stuck, so I'd really appreciate any help! Thank you! PS. PHP returns the same thing as the C API. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: undefined symbol: _dig_vec
use .bash_profile. - Original Message - From: Hoa Doan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, June 14, 2002 10:13 AM Subject: Re: undefined symbol: _dig_vec I'm sorry for bugging you, but I don't have the .profile file. I have the .bashrc, .bash_profile, .bash_logout files. My shell is bash. What do I do now? Hoa From: Bhavin Vyas [EMAIL PROTECTED] To: Hoa Doan [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: undefined symbol: _dig_vec Date: Thu, 13 Jun 2002 16:09:40 -0700 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib. Put this in your .profile file or the global .profile file so that it's executed evertime you log in. - Original Message - From: Hoa Doan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, June 13, 2002 11:34 AM Subject: Re: undefined symbol: _dig_vec Thanks for you help so far. I do have the libodbcinst.so.1. It's located in the directory /usr/local/lib, but the program doesn't know that. How do I make it see that libodbcinst.so.1 is in /usr/local/lib? -Hoa From: Bhavin Vyas [EMAIL PROTECTED] To: Hoa Doan [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: undefined symbol: _dig_vec Date: Wed, 12 Jun 2002 21:54:08 -0700 You will have to get libodbcinst.so.1. This library file is needed by libmyodbc.so. You should be able to download it from the net. Here is one link that might help http://www.slac.stanford.edu/grp/eg/minos/external/installation/lib/libodbc i nst.so.1 - Original Message - From: Hoa Doan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, June 12, 2002 6:38 PM Subject: Re: undefined symbol: _dig_vec So I ldd /usr/local/MyODBC/lib/libmyodbc.so and this is the result: libodbcinst.so.1 = not found libz.so.1 = /usr/lib etc... I did a find on libodbcinst.so.1 and found it in /usr/local/lib. What do I do from here? Hoa From: Bhavin Vyas [EMAIL PROTECTED] To: Hoa Doan [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: undefined symbol: _dig_vec Date: Wed, 12 Jun 2002 18:15:53 -0700 if you have the file /usr/local/MyODBC/lib/libmyodbc.so, then do ldd /usr/local/MyODBC/lib/libmyodbc.so and see if all the dependencies are satisfied. Regards, Bhavin. - Original Message - From: Hoa Doan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 12, 2002 11:52 AM Subject: undefined symbol: _dig_vec Hi, I'm using the unixODBC driver manager and MyODBC driver and trying to connect to my clients database on the MySQL server. But it can't connect. This is the message I get: Can't open lib /usr/local/MyODBC/lib/libmyodbc.so : undefined symbol: _dig_vec How do I fix this? -Hoa _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. - Before posting, please check: http://www.mysql.com/manual.php (the
Re: C API row data not matching database data
At 19:54 +0200 6/14/02, Hihn Jason wrote: I'm using the C API to return a record which has a field that contains (somewhat) binary data. It's been properly mysql_escape_string()ed. I'm using a 3.23.4x server client. When I do a: select data into outfile 'out' from table where id='1'; from the mysql client, I get what I expect in the outfile. When I do a mysql_fetch_row() and a row[0] on the same query from within the C API, I get similar but completely different data. The former is ~1800 bytes long, and the latter ~6200 bytes long. Determined how? strlen(), or by calling mysql_fetch_lengths()? Incidentally the data in the outfile contains a good number of the two char sequence 0x91 0x11, but in the C program, it all comes out as 0xCD Anyway, at the end of the data is a plain text sequence that I am trying to extract. I can find it ok, IF the data were there. The CAPI doesn't show it, and that is my major problem. No 0x00s exist in the datastream. I'm really stuck, so I'd really appreciate any help! Thank you! PS. PHP returns the same thing as the C API. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: replication
The master information should be present in my.cnf on the slave. What does your my.cnf look like? Regards, Bhavin. - Original Message - From: Pierre Baridon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 7:07 AM Subject: replication i am trying to setup a slave server (3.23.50) on solaris 2.7 i follow the manual to set it up but when i start this slave server, i have the following error message from mysqld : bin/mysqld: option `--master' is ambiguous where does this --master come from thanks, Pierre -- sql, 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
FileMaker Pro - MySQL
So my Linux server machine (Pentium MMX 225, RedHat 7.1) is up and running with Apache and MySQL... I'm going to stop using my iMac (Mac OS X) for database stuff. I have a very large database in FileMaker Pro, though, and I'd love to know if there's a way to import my FMP database into MySQL 3.23.36? Thanks -- Chris Garaffa That I would be good even if I lost sanity (Alanis Morissette) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 the order same?
At 12:00 PM -0500 6/14/02, Jay Blanchard wrote: [snip] When I say 'select * from table', can I always be assured of the order in which the results are retrieved. If I issue the query a second time, (assuming no new insertions on the table), will I get the results in the same order, again? [/snip] Yes. Data is always sorted from first entered to last entered unless you change the sort with an ORDER BY or GROUP BY. ...unless you do any deletes and subsequent inserts, or you optimize the table, or MySQL decides to change internal record ordering, or... As a general rule in relational databases, results should always be considered an unordered set unless you EXPLICITLY specify an ORDER BY. - steve HAGW! Jay sql, mysql, query -- ++ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | ++ | If only life would imitate toys. | | - Ted Raimi, March 2002 | | - http://www.whoosh.org/issue67/friends67a.html#raimi | ++ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
obscure mySQLGUI error
Hi, I have just installed the mySQLGUI linux binary. Upon running it, I receive the error Can't connect to local MySQL server through socket '' (111). The help file does not address this sort of error. Can you please interpret this error for me and suggest how I may fix it? I just installed mySQL and have one user account root who connects via localhost. I have tested connecting to the database manually with success. I am not sure why mySQLGUI can't connect. Thanks, Kevin Hennessy # Options file generated by MySQL client user=root host=localhost port=3306 num_of_queries=20 timeout=60 defbase= socket= queries_file=/root/.mysql_history queries_root=/root/.guiclient/queries last_database_file=/root/.guiclient/ladb terminator=, enclose=' password=1 compress=0 ask=1 max_width=50 update_timeout=10 font_used= style_file= - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 perl query question
I am trying to execute the following mysql query in a perl script... my $sth = $dbh-prepare(select * from servers); $sth-execute(); my @row; while ( @row = $sth-fetchrow_arrayref()) { foreach $row(@row) { push @SelectedArray, $row\n\n; } } print @SelectedArray; And I am getting the following error... DBD::mysql::st fetchrow_arrayref failed: fetch() without execute() at ./server_display.pl line 20 which is the while loop line. I set DBI trace and I can see the data in the table, just when it reaches the fetch it bombs on me... Sorry if this belongs more on the perl users list, but I thought everyoen would enjoy a DBI refresher...Any ideas? Thanks, Taylor Taylor Lewick Unix System Administrator Fortis Benefits 816 881 6073 Help Wanted. Seeking Telepath... You Know where to apply. Please Note The information in this E-mail message is legally privileged and confidential information intended only for the use of the individual(s) named above. If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this E-mail message. If you have received this E-mail in error, please notify the sender. Thank you * - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL not starting ?
All- Good afternoon. I was able to get MySQL started this morning but it will not start now. I'm hoping someone may be able to offer a suggestion or insight... Normally, I issue the command: [root@localhost root]# safe_mysqld -user=root [1] 1781 [root@localhost root]# Starting mysqld daemon with databases from /var/lib/mysql 020614 02:09:36 mysqld ended Normally, I am then able to log in by: [root@localhost root]# mysql -u root -p Enter password: ...but mysqld is ending so I'm not able to. I went to /var/lib/mysql looked at localhost.localdomain.err. I ran the tail command: [lfindle@localhost mysql]$ tail localhost.localdomain.err 020508 01:00:31 mysqld ended 020508 01:02:09 mysqld started /usr/sbin/mysqld: ready for connections 020508 2:54:15 /usr/sbin/mysqld: Normal shutdown 020508 2:54:15 /usr/sbin/mysqld: Shutdown Complete 020508 02:54:15 mysqld ended I'm assuming that 020508 means May 8, 02 I know I've used my MySQL since then b/c I had it running this morning. Even still, I do not see any glaring errors in the file. I pasted the contents of localhost.localdomain.err, just in case I'm missing something. Does anyone have any ideas on what might be going wrong? Thank you Laura - 020502 13:12:51 mysqld started /usr/sbin/mysqld: ready for connections 020502 13:25:34 /usr/sbin/mysqld: Normal shutdown 020502 13:25:34 /usr/sbin/mysqld: Shutdown Complete 020502 13:25:34 mysqld ended 020503 05:54:36 mysqld started /usr/sbin/mysqld: ready for connections 020503 6:37:26 /usr/sbin/mysqld: Normal shutdown 020503 6:37:26 /usr/sbin/mysqld: Shutdown Complete 020503 06:37:26 mysqld ended 020503 06:39:05 mysqld started /usr/sbin/mysqld: ready for connections 020503 7:47:31 /usr/sbin/mysqld: Normal shutdown 020503 7:47:31 /usr/sbin/mysqld: Shutdown Complete 020503 07:47:31 mysqld ended 020503 07:49:10 mysqld started /usr/sbin/mysqld: ready for connections A mysqld process already exists at Fri May 3 09:06:06 EDT 2002 020503 14:06:02 /usr/sbin/mysqld: Normal shutdown 020503 14:06:02 /usr/sbin/mysqld: Shutdown Complete 020503 14:06:02 mysqld ended 020504 09:50:21 mysqld started /usr/sbin/mysqld: ready for connections 020504 14:34:24 /usr/sbin/mysqld: Normal shutdown 020504 14:34:25 /usr/sbin/mysqld: Shutdown Complete 020504 14:34:25 mysqld ended 020504 14:36:07 mysqld started /usr/sbin/mysqld: ready for connections 020505 8:47:23 /usr/sbin/mysqld: Normal shutdown 020505 8:47:23 /usr/sbin/mysqld: Shutdown Complete 020505 08:47:23 mysqld ended 020505 09:57:48 mysqld started /usr/sbin/mysqld: ready for connections 020505 11:58:35 /usr/sbin/mysqld: Normal shutdown 020505 11:58:35 /usr/sbin/mysqld: Shutdown Complete 020505 11:58:35 mysqld ended 020505 12:00:39 mysqld started /usr/sbin/mysqld: ready for connections 020505 8:21:15 /usr/sbin/mysqld: Normal shutdown 020505 8:21:15 /usr/sbin/mysqld: Shutdown Complete 020505 08:21:15 mysqld ended 020505 09:14:10 mysqld started /usr/sbin/mysqld: ready for connections 020505 10:39:22 /usr/sbin/mysqld: Normal shutdown 020505 10:39:22 /usr/sbin/mysqld: Shutdown Complete 020505 10:39:22 mysqld ended 020505 10:42:06 mysqld started /usr/sbin/mysqld: ready for connections 020505 23:00:29 /usr/sbin/mysqld: Normal shutdown 020505 23:00:29 /usr/sbin/mysqld: Shutdown Complete 020505 23:00:29 mysqld ended 020506 00:08:04 mysqld started /usr/sbin/mysqld: ready for connections 020506 2:05:09 /usr/sbin/mysqld: Normal shutdown 020506 2:05:09 /usr/sbin/mysqld: Shutdown Complete 020506 02:05:09 mysqld ended 020506 02:06:48 mysqld started /usr/sbin/mysqld: ready for connections 020506 8:23:37 /usr/sbin/mysqld: Normal shutdown 020506 8:23:37 /usr/sbin/mysqld: Shutdown Complete 020506 08:23:37 mysqld ended 020506 08:25:55 mysqld started /usr/sbin/mysqld: ready for connections 020506 10:31:23 /usr/sbin/mysqld: Normal shutdown 020506 10:31:23 /usr/sbin/mysqld: Shutdown Complete 020506 10:31:23 mysqld ended 020506 13:47:32 mysqld started /usr/sbin/mysqld: ready for connections 020506 22:59:33 /usr/sbin/mysqld: Normal shutdown 020506 22:59:33 /usr/sbin/mysqld: Shutdown Complete 020506 22:59:33 mysqld ended 020507 00:31:58 mysqld started /usr/sbin/mysqld: ready for connections 020507 9:00:17 /usr/sbin/mysqld: Normal shutdown 020507 9:00:18 /usr/sbin/mysqld: Shutdown Complete 020507 09:00:18 mysqld ended 020507 09:03:11 mysqld started /usr/sbin/mysqld: ready for connections 020507 9:11:14 /usr/sbin/mysqld: Normal shutdown 020507 9:11:14 /usr/sbin/mysqld: Shutdown Complete 020507 09:11:15 mysqld ended 020507 10:56:31 mysqld started /usr/sbin/mysqld: ready for connections 020507 11:25:16 /usr/sbin/mysqld: Normal shutdown 020507 11:25:16 /usr/sbin/mysqld: Shutdown Complete 020507 11:25:16 mysqld ended 020508 00:41:09 mysqld started
RE: Is the order same?
Hi, I would not rely on the insertion order if I were you. Honestly, I don't know how MySQL deals with it but servers such as Microsoft SQL Server or even Access won't provide a deterministic order unless you sort using sort by. I recomend you to use sort by anyways if you need the result sets sorted, you never know if you want to migrate to another platform. To make things a little bit faster, you can create some sorted indices. Good Luck! --- Steve Edberg [EMAIL PROTECTED] wrote: At 12:00 PM -0500 6/14/02, Jay Blanchard wrote: [snip] When I say 'select * from table', can I always be assured of the order in which the results are retrieved. If I issue the query a second time, (assuming no new insertions on the table), will I get the results in the same order, again? [/snip] Yes. Data is always sorted from first entered to last entered unless you change the sort with an ORDER BY or GROUP BY. ...unless you do any deletes and subsequent inserts, or you optimize the table, or MySQL decides to change internal record ordering, or... As a general rule in relational databases, results should always be considered an unordered set unless you EXPLICITLY specify an ORDER BY. - steve HAGW! Jay sql, mysql, query -- ++ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | ++ | If only life would imitate toys. | | - Ted Raimi, March 2002 | | - http://www.whoosh.org/issue67/friends67a.html#raimi | ++ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.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
is this query possible?
I have a query that I have in mind, but am not sure of how I can actually write it. It might not even be possible. I was hoping someone could tell me if I will have to use two queries instead, or if this will actually work: (In simplified form:) ++ +---+| main | | sub1 |+++---+ +---+| id || sub2 | | id|---| sub1fk |+---+ | other || sub2fk |---| id| +---+++| other | +---+ As you can see from the simple diagram, I have a main table with its own primary key (id) but with two foreign key columns. The first one (sub1fk) points to the primary key of the table sub1. The second one (sub2fk) points to the primary ky of the table sub2. The query I'm trying to build would look something like this: SELECT main.id, IF(main.sub1fk,sub1.other,NULL) AS sub1other, IF(main.sub2fk,sub2.other,NULL) AS sub2other FROMmain, sub1, sub2 WHERE main.id = some_criteria_or_other AND sub1.id = main.sub1fk AND sub2.id = main.sub2fk; The above SQL, of course, won't work -- because there are no situations where all of the WHERE clauses are true. Rather, I'm trying to get a result set that would look like this (again, this is in theory): ++---+---+ | id | sub1other | sub2other | ++---+---+ | 1 | 2 | NULL | | 2 | NULL | 5 | | 3 | NULL |17 | | 4 | 8 | NULL | | .. |...etc |...etc | ++---+---+ Later, in my application, I can test each column for NULL and I will know that the other column is the one to use (for instance, if the value of the sub1other column is NULL in one record, then I'll use the value of sub2other to do what I want to do, and vice versa). But this just doesn't seem possible. I can always do it with two separate queries if need be, but it would be elegant to do it with one. Any advice? Thanks very much, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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: Creating Tables/Keys from PowerDesigner Sql
Well, that would depend if the SQL script generated by your designer is compatible with MySQL, some type names may be different. Good Luck! --- [EMAIL PROTECTED] wrote: I generated an SQL script of my datamodel in PowerDesigner which I'd like to import into mySql to create my tables, keys, etc. How do I accomplish this? Thanks, Jason E. Brawner - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.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 not starting ?
On Friday, June 14, 2002, at 03:48 PM, Laura Findley wrote: Normally, I issue the command: [root@localhost root]# safe_mysqld -user=root [1] 1781 [root@localhost root]# Starting mysqld daemon with databases from /var/lib/mysql 020614 02:09:36 mysqld ended Are you really only using one hyphen before user? Try using two: [root]# safe_mysqld --user=root Erik Price Web Developer Temp Media Lab, H.H. Brown [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 this query possible?
How bout SELECT main.id, sub1.other, sub2.other FROM main LEFT JOIN sub1 ON main.sub1fk = sub1.id LEFT JOIN sub2 ON main.sub2fk = sub2.id Luc mysql,sql -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 3:54 PM To: [EMAIL PROTECTED] Subject: is this query possible? I have a query that I have in mind, but am not sure of how I can actually write it. It might not even be possible. I was hoping someone could tell me if I will have to use two queries instead, or if this will actually work: (In simplified form:) ++ +---+| main | | sub1 |+++---+ +---+| id || sub2 | | id|---| sub1fk |+---+ | other || sub2fk |---| id| +---+++| other | +---+ As you can see from the simple diagram, I have a main table with its own primary key (id) but with two foreign key columns. The first one (sub1fk) points to the primary key of the table sub1. The second one (sub2fk) points to the primary ky of the table sub2. The query I'm trying to build would look something like this: SELECT main.id, IF(main.sub1fk,sub1.other,NULL) AS sub1other, IF(main.sub2fk,sub2.other,NULL) AS sub2other FROMmain, sub1, sub2 WHERE main.id = some_criteria_or_other AND sub1.id = main.sub1fk AND sub2.id = main.sub2fk; The above SQL, of course, won't work -- because there are no situations where all of the WHERE clauses are true. Rather, I'm trying to get a result set that would look like this (again, this is in theory): ++---+---+ | id | sub1other | sub2other | ++---+---+ | 1 | 2 | NULL | | 2 | NULL | 5 | | 3 | NULL |17 | | 4 | 8 | NULL | | .. |...etc |...etc | ++---+---+ Later, in my application, I can test each column for NULL and I will know that the other column is the one to use (for instance, if the value of the sub1other column is NULL in one record, then I'll use the value of sub2other to do what I want to do, and vice versa). But this just doesn't seem possible. I can always do it with two separate queries if need be, but it would be elegant to do it with one. Any advice? Thanks very much, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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
Reconstructing SQL create table statements
I have a large number of tables that have been created through the years, and I wish to obtain the SQL statements used to create them. I can go through and do it all by hand, but that would take forever. Is there a way to run a script against the database that will generate them for me? If it misses the occasional additional index, then that is fine. Thank you for your time. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 this query possible?
[snip] I have a query that I have in mind, but am not sure of how I can actually write it. It might not even be possible. I was hoping someone could tell me if I will have to use two queries instead, or if this will actually work: (In simplified form:) ++ +---+| main | | sub1 |+++---+ +---+| id || sub2 | | id|---| sub1fk |+---+ | other || sub2fk |---| id| +---+++| other | +---+ As you can see from the simple diagram, I have a main table with its own primary key (id) but with two foreign key columns. The first one (sub1fk) points to the primary key of the table sub1. The second one (sub2fk) points to the primary ky of the table sub2. . ++---+---+ | id | sub1other | sub2other | ++---+---+ | 1 | 2 | NULL | | 2 | NULL | 5 | | 3 | NULL |17 | | 4 | 8 | NULL | | .. |...etc |...etc | ++---+---+ Later, in my application, I can test each column for NULL and I will know that the other column is the one to use (for instance, if the value of the sub1other column is NULL in one record, then I'll use the value of sub2other to do what I want to do, and vice versa). [/snip] Erik, I don't have time to go into detail, but look into LEFT OUTER JOIN and RIGHT OUTER JOIN. You may be able to accomplish what you are trying to using these. I have done similar things in the past and was able to get the desired results. HTH! Jay sql, mysql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: is this query possible?
Hey, that's exactly what I needed! And I can still use WHERE clauses to further limit my results. That's great, thank you! I have one question though. In this LEFT JOIN syntax, you used the following format: LEFT JOIN secondary_table ON primary_table.col = secondary_table.col Is this optimized? In the case of WHERE clauses, for instance, I always put the main (most-limiting) criteria on the right side of the equals sign and the uncertain (least-limiting) criteria on the left side of the equals sign. Since I've never used LEFT JOIN before, I am unsure of the best way to do it. Erik On Friday, June 14, 2002, at 04:05 PM, Luc Foisy wrote: How bout SELECT main.id, sub1.other, sub2.other FROM main LEFT JOIN sub1 ON main.sub1fk = sub1.id LEFT JOIN sub2 ON main.sub2fk = sub2.id Luc mysql,sql -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 3:54 PM To: [EMAIL PROTECTED] Subject: is this query possible? I have a query that I have in mind, but am not sure of how I can actually write it. It might not even be possible. I was hoping someone could tell me if I will have to use two queries instead, or if this will actually work: (In simplified form:) ++ +---+| main | | sub1 |+++---+ +---+| id || sub2 | | id|---| sub1fk |+---+ | other || sub2fk |---| id| +---+++| other | +---+ As you can see from the simple diagram, I have a main table with its own primary key (id) but with two foreign key columns. The first one (sub1fk) points to the primary key of the table sub1. The second one (sub2fk) points to the primary ky of the table sub2. The query I'm trying to build would look something like this: SELECT main.id, IF(main.sub1fk,sub1.other,NULL) AS sub1other, IF(main.sub2fk,sub2.other,NULL) AS sub2other FROMmain, sub1, sub2 WHERE main.id = some_criteria_or_other AND sub1.id = main.sub1fk AND sub2.id = main.sub2fk; The above SQL, of course, won't work -- because there are no situations where all of the WHERE clauses are true. Rather, I'm trying to get a result set that would look like this (again, this is in theory): ++---+---+ | id | sub1other | sub2other | ++---+---+ | 1 | 2 | NULL | | 2 | NULL | 5 | | 3 | NULL |17 | | 4 | 8 | NULL | | .. |...etc |...etc | ++---+---+ Later, in my application, I can test each column for NULL and I will know that the other column is the one to use (for instance, if the value of the sub1other column is NULL in one record, then I'll use the value of sub2other to do what I want to do, and vice versa). But this just doesn't seem possible. I can always do it with two separate queries if need be, but it would be elegant to do it with one. Any advice? Thanks very much, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] Erik Price Web Developer Temp Media Lab, H.H. Brown [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
Multi-table deletes
Just wanted to make sure before I proceed to write a script, Muti-table deletes as such: delete from Keyname_Keyvalue,Keyvalue WHERE Keyvalue.KeyvalueKey=Keyname_Keyvalue.KeyvalueKey AND Keyname_Keyvalue.KeynameKey='100'; ERROR 1064: You have an error in your SQL syntax near 'Keyvalue WHERE Keyvalue.KeyvalueKey=Keyname_Keyvalue.KeyvalueKey AND Keyname_Key' at line 1 Are not supported in 3.23 but supported in 4.x. Is that correct? Any other options besides writing a script? Regards, Bhavin Vyas. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Reconstructing SQL create table statements
On Friday, June 14, 2002, at 04:06 PM, Hihn Jason wrote: I have a large number of tables that have been created through the years, and I wish to obtain the SQL statements used to create them. I can go through and do it all by hand, but that would take forever. Is there a way to run a script against the database that will generate them for me? If it misses the occasional additional index, then that is fine. If you have the mysql client programs and are using a Unix machine (maybe even Win but I'm not sure) you can use the mysqldump program. It is usually located in the bin directory of your MySQL distribution. Mine is /usr/local/mysql/bin/mysqldump. Read up on it, it can dump all data from your database and does so with the CREATE TABLE statements attached so that the whole thing can literally be rebuilt from scratch. Just chop off the contents if you only want the CREATE TABLE statements. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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 port # ?
Does anyone know how to determine what port MySQL is using? I need to know the port so that I can use it in a JDBC connection URL. Any suggestions on how to get this info? Thanks, in advance- Laura - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Reconstructing SQL create table statements
if you do mysqldump -d -p -u USERNAME DATABASENAME FILENAME then it will pipe only the CREATE TABLE statements and no insert statements into FILENAME. -Don -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 4:39 PM To: Hihn Jason Cc: [EMAIL PROTECTED] Subject: Re: Reconstructing SQL create table statements On Friday, June 14, 2002, at 04:06 PM, Hihn Jason wrote: I have a large number of tables that have been created through the years, and I wish to obtain the SQL statements used to create them. I can go through and do it all by hand, but that would take forever. Is there a way to run a script against the database that will generate them for me? If it misses the occasional additional index, then that is fine. If you have the mysql client programs and are using a Unix machine (maybe even Win but I'm not sure) you can use the mysqldump program. It is usually located in the bin directory of your MySQL distribution. Mine is /usr/local/mysql/bin/mysqldump. Read up on it, it can dump all data from your database and does so with the CREATE TABLE statements attached so that the whole thing can literally be rebuilt from scratch. Just chop off the contents if you only want the CREATE TABLE statements. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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 port # ?
'status' will show that. - Original Message - From: Laura Findley [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Sent: Friday, June 14, 2002 1:44 PM Subject: MySQL port # ? Does anyone know how to determine what port MySQL is using? I need to know the port so that I can use it in a JDBC connection URL. Any suggestions on how to get this info? Thanks, in advance- Laura - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 port # ?
Take a look in the my.cnf file. -Original Message- From: Laura Findley [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 2:45 PM To: MySQL List Subject: MySQL port # ? Does anyone know how to determine what port MySQL is using? I need to know the port so that I can use it in a JDBC connection URL. Any suggestions on how to get this info? Thanks, in advance- Laura - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
newbie - start (innodb)
This is the configuratin My.ini: [WinMySQLAdmin] Server=C:/MYSQL/bin/mysqld-max.exe user=root [mysqld] basedir=C:/MYSQL #bind-address=192.168.10.10 datadir=C:\mydata innodb_data_home_dir = c:\mydata innodb_data_file_path =sami_d1:100M innodb_log_group_home_dir =c:\mylogs innodb_log_arch_dir =c:\mylogs #language=C:/MYSQL/share/your language directory #slow query log#= #tmpdir#= #port=3306 #set-variable=key_buffer=16M But not start... Err File 020614 17:58:44 C:/MYSQL/bin/mysqld-max.exe: Shutdown Complete 020614 17:58:44 InnoDB: Shutdown completed 020614 17:58:37 InnoDB: Starting shutdown... 020614 17:58:37 C:/MYSQL/bin/mysqld-max.exe: Normal shutdown C:/MYSQL/bin/mysqld-max.exe: ready for connections C:/MYSQL/bin/mysqld-max.exe: ready for connections C:/MYSQL/bin/mysqld-max.exe: ready for connections C:/MYSQL/bin/mysqld-opt.exe: ready for connections How should i do to connect database sami_d1? Please, help me! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 port # ?
default port is 3306, or look in the my.cnf and if that doesn't work, since your using outlook, i'm guessing your on windows, you can goto a command line and type netstat -a and see what ports are being used, and try those. On Friday 14 June 2002 3:44, Laura Findley wrote: Does anyone know how to determine what port MySQL is using? I need to know the port so that I can use it in a JDBC connection URL. Any suggestions on how to get this info? Thanks, in advance- Laura - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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, sql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL port # ?
At 16:44 -0400 6/14/02, Laura Findley wrote: Does anyone know how to determine what port MySQL is using? I need to know the port so that I can use it in a JDBC connection URL. Any suggestions on how to get this info? mysql SHOW VARIABLES LIKE 'port'; +---+---+ | Variable_name | Value | +---+---+ | port | 3306 | +---+---+ Thanks, in advance- Laura - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 port # ?
On 14/6/02 at 16:44, [EMAIL PROTECTED] (Laura Findley) wrote: Does anyone know how to determine what port MySQL is using? I need to know the port so that I can use it in a JDBC connection URL. Any suggestions on how to get this info? I believe `\s' is the command you need (without the quotes or backticks of course ;-) Regards, Phil. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: newbie - start (innodb)
WHAT is not starting? MySQL or innodb? Is there another directive in your my.ini under [mysqld] like: skip-innodb? If so, delete it or comment it out. - Original Message - From: Silmara Cristina Basso [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 5:12 PM Subject: newbie - start (innodb) This is the configuratin My.ini: [WinMySQLAdmin] Server=C:/MYSQL/bin/mysqld-max.exe user=root [mysqld] basedir=C:/MYSQL #bind-address=192.168.10.10 datadir=C:\mydata innodb_data_home_dir = c:\mydata innodb_data_file_path =sami_d1:100M innodb_log_group_home_dir =c:\mylogs innodb_log_arch_dir =c:\mylogs #language=C:/MYSQL/share/your language directory #slow query log#= #tmpdir#= #port=3306 #set-variable=key_buffer=16M But not start... Err File 020614 17:58:44 C:/MYSQL/bin/mysqld-max.exe: Shutdown Complete 020614 17:58:44 InnoDB: Shutdown completed 020614 17:58:37 InnoDB: Starting shutdown... 020614 17:58:37 C:/MYSQL/bin/mysqld-max.exe: Normal shutdown C:/MYSQL/bin/mysqld-max.exe: ready for connections C:/MYSQL/bin/mysqld-max.exe: ready for connections C:/MYSQL/bin/mysqld-max.exe: ready for connections C:/MYSQL/bin/mysqld-opt.exe: ready for connections How should i do to connect database sami_d1? Please, help me! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Reconstructing SQL create table statements
There's also the SHOW CREATE TABLE tablename sql command: http://www.mysql.com/doc/S/H/SHOW_CREATE_TABLE.html According to http://www.mysql.com/documentation/mysql/bychapter/manual_News.html#News-3.23.x this command is available from 3.23.20 on. -steve At 4:39 PM -0400 6/14/02, Don Vu [EMAIL PROTECTED] wrote: if you do mysqldump -d -p -u USERNAME DATABASENAME FILENAME then it will pipe only the CREATE TABLE statements and no insert statements into FILENAME. -Don -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 4:39 PM To: Hihn Jason Cc: [EMAIL PROTECTED] Subject: Re: Reconstructing SQL create table statements On Friday, June 14, 2002, at 04:06 PM, Hihn Jason wrote: I have a large number of tables that have been created through the years, and I wish to obtain the SQL statements used to create them. I can go through and do it all by hand, but that would take forever. Is there a way to run a script against the database that will generate them for me? If it misses the occasional additional index, then that is fine. If you have the mysql client programs and are using a Unix machine (maybe even Win but I'm not sure) you can use the mysqldump program. It is usually located in the bin directory of your MySQL distribution. Mine is /usr/local/mysql/bin/mysqldump. Read up on it, it can dump all data from your database and does so with the CREATE TABLE statements attached so that the whole thing can literally be rebuilt from scratch. Just chop off the contents if you only want the CREATE TABLE statements. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- ++ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | ++ | If only life would imitate toys. | | - Ted Raimi, March 2002 | | - http://www.whoosh.org/issue67/friends67a.html#raimi | ++ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Increasing an Integer field with SQL statement
Hi, can I do a sql query in MySQL that would do something like this: UPDATE table SET SomeInteger=SomeInteger+1 WHERE (Some Condition) I know that this exact syntax doesn't work, but is there a way to do what I'm trying to do, which is to do a math function on an integer in the table with a SQL command? TIA Tab - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
[JDBC / MySQL] Access Denied for User ?
I am not sure if a Java JDBC error is appropriate for this list or not. If not, I apologize in advance. I'm getting the error below that I'm trying figure out where to start researching... Invalid authorization- access denied for user... This seems strange b/c I'm using root as username, secret is password. I'm able to log into mysql using that info so I'm not sure why I don't have access to this particular table. I was under the impression that the root user in MySQL had permissions to all tables... hmmm [my code is below if anyone is interested- i know it's not very exciting- i'm very new to both Java MySQL] [lfindle@localhost java]$ javac TestMMDriver.java [lfindle@localhost java]$ java TestMMDriver java.sql.SQLException: Invalid authorization specification: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) at java.lang.Throwable.fillInStackTrace(Throwable.java:native) at java.lang.Throwable.init(Throwable.java:38) at java.lang.Exception.init(Exception.java:24) at java.sql.SQLException.init(SQLException.java:22) at org.gjt.mm.mysql.MysqlIO.init(source file unknown:line unknown, pc 0x829148e) at org.gjt.mm.mysql.Connection.connectionInit(source file unknown:line unknown, pc 0x826044b) at org.gjt.mm.mysql.jdbc1.Connection.connectionInit(Connection.java:92) at org.gjt.mm.mysql.Driver.connect(source file unknown:line unknown, pc 0x824eab1) at java.sql.DriverManager.getConnection(DriverManager.java:61) at java.sql.DriverManager.getConnection(DriverManager.java:49) at TestMMDriver.main(TestMMDriver.java:35) Any suggestions on where to research these errors would be most appreciated... Thanks, in advance- Laura AIM- lefindley --- import java.io.*; import java.sql.*; //import java.sql.ResultSetMetaData; import jpb.*; import java.util.*; // JDBC Imports import org.gjt.mm.mysql.*; import org.gjt.mm.mysql.Connection; import org.gjt.mm.mysql.Statement; import org.gjt.mm.mysql.Driver; import org.gjt.mm.mysql.ResultSet; public class TestMMDriver { public static void main(String[] args){ Connection con = null; try { String url = jdbc:mysql://localhost:80/brandonbooks; Statement stmt; ResultSet rs; Class.forName(org.gjt.mm.mysql.Driver); con = (Connection) DriverManager.getConnection(url,root,secret); } catch (java.sql.SQLException e) { e.printStackTrace(); } catch(java.lang.ClassNotFoundException e){ e.printStackTrace(); } finally { if (con != null){ try { con.close(); } catch (Exception e){ } } } } } - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
varchar to char ...
Hi guys, I have a query.I am not sure if this is a bug or a feature (ha ha ha...). Table - abc name varchar(30), address varchar(50) Then I run this sql. create table temp_abc as select * from abc; datatypes of the columns changes: Table - temp_abc name char(30), address char(50) any clues, Vivek - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Increasing an Integer field with SQL statement
At 17:29 -0400 6/14/02, Tab Alleman wrote: Hi, can I do a sql query in MySQL that would do something like this: UPDATE table SET SomeInteger=SomeInteger+1 WHERE (Some Condition) I know that this exact syntax doesn't work, but is there a way to do what I'm trying to do, which is to do a math function on an integer in the table with a SQL command? What happened when you tried it? TIA Tab - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 Replication
I am having a problem with replication. I had a master / slave environment set up and running successfully. I then took the slave offline for a while and made substantial changes to the master. Then I master copied the new database environment to the slave server by taring the tables and copying them to the slave server. Then I restarted the slave and now my slave database is not working. Is there something that I need to do in order to resync the slave with the new master? David McInnis Not really an SQL or query question, but ... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
alter column without dropping
The data going into one of my mySQL columns has suddenly changed, so I need to change the parameters of the column. Currently, it is varchar(32), I need to change it to varchar(128). Can I do that without dropping the column? Thanks, Paul
RE: Is the order same?
On Fri, 14 Jun 2002, Francisco Reinaldo wrote: Date: Fri, 14 Jun 2002 12:52:15 -0700 (PDT) From: Francisco Reinaldo [EMAIL PROTECTED] To: Steve Edberg [EMAIL PROTECTED], Vandana [EMAIL PROTECTED] Cc: Jay Blanchard [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: Is the order same? Hi, I would not rely on the insertion order if I were you. Honestly, I don't know how MySQL deals with it but servers such as Microsoft SQL Server or even Access won't provide a deterministic order unless you sort using sort by. SQL standard doesn't provide deterministic order. In fixed record size ISAM tables slots are reused (would expect that). Every book I've read says that order is random unless you sort. I recomend you to use sort by anyways if you need the result sets sorted, you never know if you want to migrate to another platform. To make things a little bit faster, you can create some sorted indices. Good Luck! --- Steve Edberg [EMAIL PROTECTED] wrote: At 12:00 PM -0500 6/14/02, Jay Blanchard wrote: [snip] When I say 'select * from table', can I always be assured of the order in which the results are retrieved. If I issue the query a second time, (assuming no new insertions on the table), will I get the results in the same order, again? [/snip] Yes. Data is always sorted from first entered to last entered unless you change the sort with an ORDER BY or GROUP BY. ...unless you do any deletes and subsequent inserts, or you optimize the table, or MySQL decides to change internal record ordering, or... As a general rule in relational databases, results should always be considered an unordered set unless you EXPLICITLY specify an ORDER BY. - steve HAGW! Jay sql, mysql, query -- ++ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | ++ | If only life would imitate toys. | | - Ted Raimi, March 2002 | | - http://www.whoosh.org/issue67/friends67a.html#raimi | ++ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.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 Sincerely, William Mussatto, Senior Systems Engineer CyberStrategies, Inc ph. 909-920-9154 ext. 27 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php