Re: Problem with Replication - Slave Option replicate-ignore-tabl e and replicate-wild-ignore-table
Hi, I have had similar problems with do-table, but never succeded finalizing my bug-report. I have added (on master) ... SET SQL_LOG_BIN = 0 as start of each action where not to replicate data SET SQL_LOG_BIN = 1 as start of each action where to replicate data Further I have had some issues where data seams to be lost during replication, mainly index, hardly data. For the last couple of days it seams OK after having added FLUSH LOGS (save log-files) after each action where data must be replicated. This migh give a number of smal replication-files, but actually they seams to be replicated faster than one big file. So right now, my master and two slaves seams to be in fine condition. Further I have made ans ASP/XML program where to read table-status from master and each slave, and comparing datasize, indexsize and so, for having a complete database-status view . Best regards Peter - Original Message - From: Mike Lohmann [EMAIL PROTECTED] To: Victor Pendleton [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 13, 2004 11:49 AM Subject: Re: Problem with Replication - Slave Option replicate-ignore-tabl e and replicate-wild-ignore-table Yes. I also tried that. Are there any other suggestions? What's about the different sections in my.cnf? Should these statements beeing written under [mysqld_safe], too? Victor Pendleton wrote: In the slave's my.cnf have you tried just expliciting statement what tables to ignore? replicate-ignore-table=db.table1 replicate-ignore-table=db.table2 ... replicate-ignore-table=db.tablen And remove the other statements? -Original Message- From: Mike Lohman To: [EMAIL PROTECTED] Sent: 9/10/04 10:53 AM Subject: Problem with Replication - Slave Option replicate-ignore-table and replicate-wild-ignore-table Hi, I've got a running Master-Slave environment with 8 Slaves and 1 Master. The problem is not the replication itself, but to exclude some tables out of it. Excluding databases runs without problems. All server are of the same version: mysql --version mysql Ver 12.22 Distrib 4.0.18, for pc-linux-gnu (i686) From several forums, discussion groups and the manual I found out, that I have no mistake in my configs. But I cannot get it to run. Worse. Perhaps someone has an idea. I found some statements in this list, generated earlier, but never be answered: http://lists.mysql.com/mysql/153722 I tried several times to delete the master.info on the slave and restart the slave-server. Replication allways got up to work again. But the replicate-wild and replicate-ignore-table entries are never used. Please help. Part of the slave- my.cnf, concerning replication: master-host=masterip master-user=repl master-password=password master-port=3306 server-id = 2 replicate-ignore-db = mysql replicate-ignore-db = test replicate-do-db=normal replicate-wild-ignore-table=normal.page% Part of the master- my.cnf, concerning replication: server-id = 1 log-bin = /var/log/mysql/mysql-bin.log #log-update = /var/log/mysql/mysql-update.log binlog-do-db= normal binlog-ignore-db= mysql SHOW MASTER STATUS: mysql SHOW MASTER STATUS; +---+--+--+--+ | File | Position | Binlog_do_db | Binlog_ignore_db | +---+--+--+--+ | mysql-bin.002 | 761239 | normal| mysql| +---+--+--+--+ 1 row in set (0.02 sec) SHOW SLAVE STATUS: mysql SHOW SLAVE STATUS\G *** 1. row *** Master_Host: master IP Master_User: repl Master_Port: 3306 Connect_retry: 60 Master_Log_File: mysql-bin.002 Read_Master_Log_Pos: 774689 Relay_Log_File: slave-relay-bin.006 Relay_Log_Pos: 323911 Relay_Master_Log_File: mysql-bin.002 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_do_db: normal Replicate_ignore_db: mysql,test Last_errno: 0 Last_error: Skip_counter: 0 Exec_master_log_pos: 774689 Relay_log_space: 323911 1 row in set (0.00 sec) Thanks in advance. Mike -- [werk01] - Mike Lohmann Software Engineering | System Administration Herforder Strasse 24 33602 Bielefeld Telefon:+49 52 1 - 96 74 26 1 Fax:+49 52 1 - 96 74 36 4 Mobil: +49 17 1 - 27 04 15 6 http://www.werk01.de http://mike.werk01.de -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL
Re: Drop all keys / indexes on a table?
Hi, Take at look at CHECK TABEL - as far as I remember, the CHECK TABLE EXTENDED will do a re-index (check index), otherwise some of the other OPTIMIZE, etc. can help on this. Take a look in the exellent manual. Best regards Peter - Original Message - From: Daevid Vincent [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 30, 2004 9:44 PM Subject: RE: Drop all keys / indexes on a table? Ugh. I was afraid you were going to say that... Seriously, there's no way to just 'wildcard' ALL indexes, someone should add that as a feature request. We're using 4.0.17 BTW. What happens if I list out all the indexes that there _could_ be in one ALTER line like that, and one of the indexes doesn't actually exist? Will the whole ALTER fail? Here's the situation, I wrote a script that runs recursively through a directory and applies all the .sql files it finds (in alpha order). This script runs as part of a client update, and doesn't necessarily run the same number of times for everyone. So, some clients may have extra indexes: foo_1, foo_2, foo_3, ... foo_15 etc. (the problem at hand), and other clients may just have: foo_1, foo_2, foo_3. -Original Message- From: Victoria Reznichenko [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 30, 2004 12:48 AM To: [EMAIL PROTECTED] Subject: Re: Drop all keys / indexes on a table? Daevid Vincent [EMAIL PROTECTED] wrote: It has come to my attention that we have maxed out our keys due to a stupid update script bug. It seemst that we've not been explicitly naming our keys and therefore mysql tried to be helpful and adds a new key each time! *sigh*. Is there a SQL command to DROP ALL keys on a table, so I can just ALTER it and add them specifically again? Specify several DROP INDEX clause in the single ALTER TABLE statement: ALTER TABLE table_name DROP INDEX index_name1, DROP INDEX index_name2, .. , DROP INDEX index_nameN; -- 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Dream MySQL Server?
Hi Alec, You are not mentioning the application, if this is a web-based application/interface or some internal heavy stuff. I'm running Windows 2000 and MySQL (and are happy, sleep fine every night !) for web-sites, and have only a P4 1.6 processor - and this is working very fine so far. So, if You are running a web-based application/interface, You have to focus on harddisk speed and security/redundency and LAN-I/O (100Mbit is fine), the remaining hardware will cover very well. Best regards Peter Copenhagen Denmark - Original Message - From: Sasha Pachev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 10:45 PM Subject: Re: Dream MySQL Server? [EMAIL PROTECTED] wrote: I have a requirement for a system that is of the order of 8-10 times the size of my current system. Unfortunately (a) I don't know how many times larger it actually is, and (b) my current system, while very happy, even relaxed, on its current hardware, has not yet been subjected to the full rigour of the target number of users. So it is very difficult to estimate what hardware I need to specify for the new system. Fortunately, the budget is fairly generous. Obviously, we don't want to gold-plate the system - but if a bit of overspend gives faster-than-specified performance, that will be a gain rather than wasted money. So I can get a lot of hardware - if I can confidently state that it will improve MySQL performance. So what should I be planning to use? The database is quite small - 2-4 Gb, but high churn: maybe 25% of it replaced every day. Reads dominate writes, but not overwhelmingly: at a guess, 10:1. The current hardware is dual Xeon 2.0, 2Gb, single Scsi disk. The one fixed factor is that the OS is Windows 2000 (I know the arguments for Linux/BSD, but that is not feasible). Scanning a PC manufacturer's website, it seems easy to get 4x2.5GHz Xeon, 1Mb L3, 8Gb ram, dual 15000 rpm Scsi with Raid 1 (for performance as well as reliability). Does this sound balanced for a MySQL engine? Or what would other people advise? My advice is that in the end, hardware does not matter that much. If it solves a problem, it solves it until your data outgrows it again, and eventually you hit your budget limitations and cannot afford an upgrade. Of course, there are certain common sense rules that need to be followed, eg. if you have a 20 GB database, you need at least a 20 GB disk, but otherwise, if your application is good, it runs well on modest hardware, and if not, doubling the data is likely to kill it no matter how powerful hardware you use on it. A good case in point was an earlier post from an 8-CPU Irix user. I would suggest you focus on making the application good. It would be wise to invest a portion of the hardware budget into purchasing a MySQL support contract or consulting services. Regarding Windows 2000 - I am curious why MySQL is an option, but Linux is not. They kind of go together, almost the same as MS-SQL and Windows, or Oracle and Solaris. Is this a dedicated MySQL machine? If yes, I cannot think of one technical reason to run Windows on it, and I've tried hard in the past. If you were using Oracle or especially MS-SQL, it would make sense. But if you've decided that MySQL is it for your database, I would really have a hard time coming up with any reasonalbe justification for Windows even if Microsoft or somebody else was going to pay me big money for it. -- Sasha Pachev Create online surveys at http://www.surveyz.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: datetime in mysql
Hi, If You take Your really exellent MySQL Reference Manual, and search for timestamp or look into chapter 6.2, You fill find what You are looking for. Best regards Peter - Original Message - From: CurlyBraces Technologies ( Pvt ) Ltd To: [EMAIL PROTECTED] Sent: Friday, February 27, 2004 7:09 AM Subject: Fw: datetime in mysql - Original Message - From: CurlyBraces Technologies ( Pvt ) Ltd To: mos Sent: Friday, February 27, 2004 11:51 AM Subject: Re: datetime in mysql sorry , as u said , i did it . it doesn't work for me .This table i want to view in the Web. So that date and time must fully automated. Must be keep connect with system date and time.plz help me ...exactly i need ur help . thanx - Original Message - From: mos To: CurlyBraces Technologies ( Pvt ) Ltd Cc: [EMAIL PROTECTED] Sent: Friday, February 27, 2004 10:32 AM Subject: Re: datetime in mysql At 10:13 PM 2/26/2004, you wrote: hi , i have created datetime field in the field name abc. so i want to get the system date and time automatically to the abc field for in each records. how can i do that ?can somebody help me ..plz thanx in advance curlys Hi Curly, :) To save the current date time into a DateTime column, make sure column is set to Not Null and just save NULL into that column. Or if you don't want to have to physically use NULL then you could use a TimeStamp column which will always update the column whenever the row is changed (for the first TimeStamp column in the table). TimeStamp is more automatic but may be too automatic if some times you don't want the timestamp column updated. The choice is yours. Mike -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problem with Selecting Text and Blob fields
Hi, I have had problems reading BLOB fields using MyODBC (I can't see if this is Your way of doing this). I have solved reading/updating BLOB using the samples from http://www.vbmysql.com/ - http://www.vbmysql.com/articles/visual-basic_mysql/blobaccessvb.html Best regards Peter - Original Message - From: Jacob Joseph [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 6:32 PM Subject: Problem with Selecting Text and Blob fields When a select query is run on a mysql table with text and blob fields, the text fields return the whole text but the blob fields return only the first 4 bytes of the blob data. I use MySQL 4.0.17 with VB6.0 on Windows 2000. What should I do to retrieve complete data from the blob field? Any help is appreciated and thanks in advance. Jacob Joseph. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.588 / Virus Database: 372 - Release Date: 2/13/04 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL big problem
Hi, The install of MySQL is mainly only a unpack. If You make a new folder - ex. C:\mysql02 - and install in this, You have the \data available and can copy to Your first installation, or change You my.ini to use second installation. Best regards Peter WR - Original Message - From: chatiman [EMAIL PROTECTED] To: chatiman [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, February 14, 2004 9:08 PM Subject: Re: MySQL big problem I have resolved the problem by: - removing the /var/lib/mysql/mysql folder - reinstalling the mysql-server package Anyway I have no idea of where this can come from. This seems like an obscure bug Is there a way to reinstall a new 'mysql' database without reinstalling the software ? - Original Message - From: chatiman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 14, 2004 8:46 PM Subject: MySQL big problem Since today I can only access to 2 databases (instead of 10) : mysql -u root show databases shows me only 2 db theres 10 in /var/lib/mysql I suspect that the grant tables are damaged . How can I repair them ? Note that I cannot do mysql -u mysql mysql which returns access denied to '@localhost' -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Mysql issues.
Hi, Two way, depending on size of Your data ... - programming if data is more than 64MB - best way - export MS SQL 7 to MS Access and import MS Access to MySQL (my experience is only char.data, no image in blob or other things like this) Best regards Peter W Rasmussen - Original Message - From: Dale Goolcharan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 13, 2004 1:07 AM Subject: Mysql issues. Hi, I am currently migrating data DIRECTLY from a microsoft sql server 7 database into a mysql database. The sql database supports strings in different languages(Japanese French, spanish and so on). The sql 7 database has been setup to support unicode. 1. How do I create a databese to support unicode in mysql. I read the doc. on mysql.com and it specified about using the database unicode parameter or setting unicode at the column level. How can I perform this at the command line. I will prefer to use the Database option. 2. The above migration only works if I use varchar(255) instead of blob datatype. I need in mysql to have columns in tables that will support up to 5000 charaters for string data. Sql 7 complains that it does not support blob upon exporting data into mysql directly. All other datatypes work. How do I solve this and does mysql allow a dataype that can accept string data up to 5000 characters. I am new to mysql. Any help will be appreciated. Thank you. Dale Goolcharan. _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/viruspgmarket=en-caRU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: transaction support
Hi, I have been using MySQL since 3.2x and now 4.0.1x in Windows NT and Windows 2000 IIS / .asp environment including MyODBC for more than 4 years now, and never lost any data. Setup problems have been solved by reading and following instruction in the manual, or asking in the support / newsgroups. So, you can have a pricewise cheap database (remember to contribute to the company), with free worldwide support, or a expensive SQL server with only payable support - if you contribute the same amount to MySQL as to MS, you might probably (almost) get your personal supportline. Best regards Peter Copenhagen denmark - Original Message - From: Bryan Koschmann - GKT [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Sent: Tuesday, January 06, 2004 3:37 AM Subject: transaction support Hi, I'm trying to get a software designer to write us some software using MySQL as the database server (he currently requires MS SQL). It is all windows based software (written in VB). So far his arguments against it are this (not my words): -No explicit transactional support -MySQL is still buggy -MyODBC is buggy and not used in production environments -Only way to connect using ODBC is third party drivers that cost over half as much as MS SQL This is just for our current software, the new software he is bidding on says he would use .NET so that supposedely causes other problems. Now, I know there are a few discrepancies there but I just don't know enough to argue it. I * need* to use MySQL as the server because of cost reasons. I *WANT* to use MySQL because I don't care for MS choose not to run their products. If you can give me any information to help me argue this I would really appreciate it. Thanks, Bryan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: More database replication
Støt Julemærkesagen Hi, From my experience, if You have to write ... LOAD DATA FROM MASTER Your replication is not setup correctly. LOAD DATA FROM MASTER is reload of the whole table, and by that You also get the updates. When working correctly, the replication starts when MASTER and SLAVE are started and get in contact with each other, the updates are stored in a "update-file" and also copyed to the SLAVE - unless You useex. SLAVE STOP will stop the replication, SLAVE START will start the replication - or,when having added commands in the SLAVE myini.cnf file, the SLAVE might delay in starting replication. It is all well explained in the manual. And also You question regarding "both" MASTER / SLAVE is explained as far as I remember - I do not think both system can be both - one MASTER and one SLAVE (and as far as I remember, it is also in the manual shown how to switch). I would stick to one MASTER which also apply the updates, and one SLAVE as backup which will take over if MASTER is down, based on latest update-status from MASTER - and, only if MASTER is down for long time, I would consider start updating SLAVE. If You need further backup, it might be backup of the database-data in regular dump's, and further the SLAVE can do a "file-backup" of changes. So, there are a lot of options (chapter 4.10). Best regards Peter - Original Message - From: "Richard Bewley" [EMAIL PROTECTED] To: "'Richard Bewley'" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, December 04, 2003 3:15 AM Subject: RE: More database replication Anyone have any ideas about this? Thanks, Richard -Original Message- From: Richard Bewley [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 7:10 PM To: [EMAIL PROTECTED] Subject: More database replication Hi, I have a "mission critical" database, that I want to be redundant, so I'm using, as discussed in another thread, the Cisco LocalDirector, two mysql machines, and db replication. mySQL version 4.0.16, compiled from source. Should I make both servers both master and slave, or will this cause problems? Would it be better, to make one primary server master, and just have a slave as a "failover" db server for the LocalDirector to send traffic to only if the primary is down? Also, the problem I've come across is, I have gotten replication setup correctly, and it works, but only when I type mysql LOAD DATA FROM MASTER; I'd rather have it automatically be replicating rather than have to run that command every time, or rather than having a cron job do it, which I see as messy at best. Any suggestions? Thanks, Richard-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
Re: My Company DB Wars
Hi, You could bring the attention to www.mysql.com - probably German software company SAP would not integrate with MySQL, if there were any kind of problems. Further You could look at the success stories ( http://www.mysql.com/press/user_stories/index.html ), and You will find NASA, Yahoo! Finance among others. best regards Peter - Original Message - From: Randy Chrismon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 27, 2003 8:50 PM Subject: My Company DB Wars My old Micro-Economics professor must be chortling in his grave... The bosses told me a few minutes ago to quit pusing MySQL for an internal project and to move my proof-of-concept tables from MySQL running on a Linux desktop with 512mb of ram and the bloody DB on an external USB to a DB2 database running on a Win2K server with 1GB ram and a 120 GB raid system. The reason? TPTB simply can't believe that a licensed MySQL system at $450 for the base license, no connected user fees and $2,500 per year for advanced support (we need InnoDB, FK constraints and transaction safe tables) can possibly be as good as DB2 at a minimum of 5 times the software cost. Afterall, DB2 has triggers and stored procedures (although nobody -- including the contractors actually doing the coding -- can point to a single stored procedure or trigger that is essential to the project). The contractors ARE making fairly extensive use of views but I've already figured out three ways around them. Go figger. I will continue to use MySQL for testbedding. Also, since I'm the gate-keeper for the contractor's code, I'm going to keep their stuff as generic as possible. BTW, one question, does MySQL run on the AS400? Randy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Selecting on timestamp(14)
Hi, I dont think so - the timestamp is a system-field, set by the system and can not be modifyed by users. You probably have to make an additional datetime-field for You purpose - if You can do CONCAT(timestamp + NOW()) when it is INSERT, I dont know - try. best regards Peter - Original Message - From: Scott Haneda [EMAIL PROTECTED] To: MySql [EMAIL PROTECTED] Sent: Sunday, September 28, 2003 4:47 AM Subject: Selecting on timestamp(14) I have a timestamp(14) column, I need to expire/decay certain records over time, can I use NOW() and INTERVAL on a timestamp(14) column Looking to expire a record that is x hours old For example Update table set active = '0' where updated = -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Fax: 313.557.5052 [EMAIL PROTECTED]Novato, CA U.S.A. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL - MS SQL
Hi, MySQL is running fine on Win2000 and IIS, so why change to MS SQL ? Best regards Peter - Original Message - From: Sheni R. Meledath [EMAIL PROTECTED] To: MySQL Masters [EMAIL PROTECTED] Sent: Saturday, June 21, 2003 10:42 AM Subject: MySQL - MS SQL Hi, I have designed a site using PHP MySQL. Recently an urgent requirement has come up from the client side to change the web server to IIS. So I have to migrate the scripts and database to Windows based ASP MS SQL. Can any body provide me some details regarding migrating MySQL databases to MS SQL databases. It would be highly appreciated if you could send me the details at the earliest. Sheni R Meledath [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Complex SQL involving 10 checkboxes
When I have these kind of settings/testing, I make one text-field and set a specific code ex. age 0-5 [age00-05] age 6-10 [age06-10] and so on - then you reduce the SQL to always read that specific tablefield, and leave the complexity to the program instead. best regards Peter - Original Message - From: Mike Hillyer [EMAIL PROTECTED] To: vernon [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, June 19, 2003 8:57 PM Subject: RE: Complex SQL involving 10 checkboxes Well, if one checkbox represents ages 1-5, another represents 6-9, and another represents 10-15, then you have the checkboxes add where clauses. Here is a pseudocode/basic example: *START WITH A SELECT* SQL = SELECT * FROM TABLE WHERE *BUILD THE WHERE CLAUSES* IF check1 THEN SQL = SQL age BETWEEN 1 AND 5 AND IF check2 THEN SQL = SQL age BETWEEN 6 AND 9 AND IF check3 THEN SQL = SQL age BETWEEN 10 AND 15 AND *TRIM THE UNUSED AND STATEMENT SQL = left(sql, len(SQL) - 3) Add some GROUP and ORDER and LIMIT clauses as needed and send the resulting string to the server. Regards, Mike Hillyer www.vbmysql.com -Original Message- From: vernon [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 12:53 PM To: [EMAIL PROTECTED] Subject: Complex SQL involving 10 checkboxes I'm trying to setup a SQL statement that involes using 10 different checkboxes. The checkboxes repersent age groups that I need to forward to an SQL statement. What would be the easiest way to do this? As I think this through I'm thinking I have to check it 1 and 2 are checked and not 3-9 and so forth which can drive a person to drink espically when I have other SQL statemenst I need to add to it as well. Any ideas on the best way to do this? I have this whole thing I was going to post to the list but figured I start out with the basic question first. Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SQL question
Hi, I have a SQL issue I cannot figure out, perhaps somebody can help / solve / input on this ... I have a table with stock-status transactions like ... 2003-06-17 06:00 stockA SKU1 QTY 98 2003-06-16 06:10 stockA SKU1 QTY 101 2003-06-15 04:59 stockA SKU1 QTY 111 - the time for updating the transaction - each specific stock - each specific SKU / partnumber - quantity in stock at time of transaction The SQL issue - are there some way in SQL I can SELECT only latest transaction for each stock/SKU no matter date of update, or do I have to read thrue all transactions and select in the program ??? Thanks and best regards Peter Rasmussen Copenhagen Denmark
Re: mysql.org
Hi Van, I have no experience with Progress software. Once, Progress must have seen their approach as the right way. That they sonner or later see a need to change, does not approved the way it is done. In short term, the clients for the NuSphere are already familiar with MySQL and subscribers to the mysql-email-listings - we have all access to Montys email from yesterday - and hopeful understand the issues and remain loyal. Actually it is the same channels NuSphere have used for spreading their message (and right now they are reading what we are writing). This is the best (only) current channel to the MySQL community. I will call on anybody having web-sites, where they provide software to MySQL, providing support or information, selling books or what so ever - to add an easy readable message to their website ... We support / contribute to the original MySQL initiative at www.mysql.com (or something like that) ... and by that make it clear to newcomers, that there are something to be aware of. Best regards Peter - Original Message - From: Van [EMAIL PROTECTED] To: PeterWR [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, July 13, 2001 7:06 AM Subject: Re: mysql.org PeterWR wrote: Then you can start wondering why one software company wants to promote open source by using another companys software - why is the Progress database not good enough for NuSphere ??? Best regards Peter Copnehagen Denmark Peter: Have your ever worked with Progress? It's ... interesting. It's like no other database system I've ever seen, and, it's hardly SQL-compliant. At least when I worked on Progress 6.0 in '98. Progress had much to gain by incorporating MySQL features and more-or-less SQL-compliant features/syntax. That's why the Progress database was possibly not good enough for NuSphere. Best Regards, Van -- = Linux rocks!!! http://www.dedserius.com/ = - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql.org
Hi Monty, When reading Your comments, I became very sorry for You and MySQL. With almost four years experience on MySQL on Windows, I have had no problems of any kind. You and Your people are doing a great job both on the software and on the support - other major players could learn from MySQL way of doing this. MySQL is probably the most (the only) successfull open source software today, worldwide. I also became upset. The Internet is surposed to be a free and open world. Just because You / MySQL have worked hard on the software and technical, and perhaps less considering the marketing - some other company finds a free domain-name and starts making benefits / violations on Your efforts - and all other peoples free efforts and contributions to MySQL. This handling of NuSphere also violates the whole idea about open source, because anybody contributing free stuff now have to consider their copyrights - and copyrights can only be protected by making none open protections - and the open source idea is dead. I propose we all support MySQL in their efforts on this issue, ex. by sending our comments to NuSphere on [EMAIL PROTECTED] Yes, it does not says mail: nusphere. Going to http://www.nusphere.com/about/index.htm mention the email [EMAIL PROTECTED] and also mentioning NuSphere Corporation is a Progress Software Company formed to provide open source products and services - and You can link to the www.progress.com Then you can start wondering why one software company wants to promote open source by using another companys software - why is the Progress database not good enough for NuSphere ??? Best regards Peter Copnehagen Denmark - Original Message - From: Michael Widenius [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, July 13, 2001 7:38 AM Subject: mysql.org snip - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php