Re: Birthday strategy

2005-08-25 Thread Jigal van Hemert
Pooly wrote: Hi, I would like to display a list of members who have their birthday a given day (today for instance). For such an application I've used a single integer column to store a number consisting of the month and day (day as 2 digits!!!) concatenated. So dates range from 101 to 1231.

DB admin with limited access

2005-08-25 Thread mysql
Salutations! I am relatively new to the MySQL flavor of database server and now have run into a situation on my hosting that I don't seem to be able to resolve. I installed a new query using TEMPORARY tables via the PHP 4 interface on a production database and suddenly began receiving PHP

Re: Birthday strategy

2005-08-25 Thread Pooly
Hi! Thanks for all your answers. I'll go for a flexible solution, with one column for day, one for month and if i want to compute the age, a year column. This will also give more flexibility if someone does not want to give his birthdate with precision (He would be able to only give the month,

Re: INSERT IGNORE Doesn't Seem To Work

2005-08-25 Thread Alec . Cawley
Hal Vaughan [EMAIL PROTECTED] wrote on 24/08/2005 17:41:36: # Okay, so INSERT IGNORE only works if I am avoiding duplicate keys. Is there any way to use INSERT the way I thought INSERT IGNORE worked -- in other words is there any keyword for the INSERT command to keep it from

Re: Change table encoding to UTF-8

2005-08-25 Thread Andreas Steichardt
On Wednesday 24 August 2005 20:01, MightyData wrote: What is the proper procedure to change the table (or database encoding) from latin1 to UTF-8 with MySQL 4.1.x? My thought is to export the data to text file, drop the table, recreate the table with the proper encoding and then import the

Re: ORDER BY distance from a point

2005-08-25 Thread douglass_davis
Scott Gifford wrote: Hello, I'd like to sort my query results based on their distance from a given point. The actual data I have will be in (longitude,latitude) format, but I can convert to something else if that will work better. For example, I may have data like this Item

Re: Change table encoding to UTF-8

2005-08-25 Thread Gleb Paharenko
Hello. If you're upgrading from 4.0 read: http://dev.mysql.com/doc/mysql/en/charset-conversion.html If your tables were created in 4.1 you may use ALTER TABLE and ALTER DATABASE to change the table (or database encoding). See: http://dev.mysql.com/doc/mysql/en/alter-table.html

Re: user defined exceptions

2005-08-25 Thread Gleb Paharenko
Hello. For a pity I'm not a JDBC expert. Hi, Thanks for that bit of info. This may be a stupid question, but how exactly does setting the variable @err help me with my current situation? Will this allow me to generate a JDBC Exception or is it something I'll need to

Re: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION'

2005-08-25 Thread Gleb Paharenko
Hello. What is the value of the default_charset variable in your php.ini file? What version of MySQL do you use? Florian Burkart [EMAIL PROTECTED] wrote: What might help as well is another problem I have: Somehow, the data I am getting out of mysql and php and is being served by

Re: Birthday strategy

2005-08-25 Thread Gleb Paharenko
Hello. You're right. I haven't understood the problem properly. Terence [EMAIL PROTECTED] wrote: Wouldnt that only work for the current year? For example I was born on 1970-08-25, select id from members where birthday = now(); wouldnt return my birthday if it was today. Or am I

Re: Older tables caught between ISAM and MyISAM

2005-08-25 Thread Gleb Paharenko
Hello. Have you tried mysql_convert_table_format script? Spencer Yost [EMAIL PROTECTED] wrote: I just upgraded a server to MySQL 4.1.4. I was at 4.0.8 - everything worked perfect at 4.0.8 However, since the upgrade, a few dozen tables in a few older databases are apparently

UK Bank Holidays

2005-08-25 Thread Shaun
Hi, I need to work out number of business days worked by staff in our company i.e. Available days = Days in year - (Saturdays + Sundays + Bank Holidays) (Available Days - Time Off) = Capacity Is MySQL aware of UK Bank Holidays or do I have to create a separate table and keep it updated with

create serial number by select

2005-08-25 Thread Gyurasits Zoltán
Hello All! I have a little problem. I can't do serial number in result of select. Example: TABLE1 value -- res1 res2 res3 SELECT (??), value FROM table1 ... 1res1 2res2 3 ... . . I can't build serial number in table1! Thans! Best Regards! Zoli

Re: create serial number by select

2005-08-25 Thread Jigal van Hemert
Gyurasits Zoltán wrote: Hello All! I have a little problem. I can't do serial number in result of select. I guess you want to display a sequential number for each row in the result. First of all a warning: if there is no ORDER BY in the query there is no specific order in which the results

Truly random 'groupie'

2005-08-25 Thread Dan Bolser
Hi, I think I saw this question being asked before, but I can't remember if their was a simple answer. If I have a table of two columns (PK and FK) with a one to many relationship, i.e. PK FK 1 a 2 a 3 a 4 b 5 b 6 b 7 c 8 c 9 d

Re: MysqlI

2005-08-25 Thread Bill
Hi Did someone use MySQLI in production environment ? Is the transactions aspect reliable ? (bugs etc) Thanks. Sorry I should have specified that it's in the PHP environment. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: MySQL

2005-08-25 Thread SGreen
news [EMAIL PROTECTED] wrote on 08/25/2005 08:14:53 AM: Hi Did someone use MySQLI in production environment ? Is the transactions aspect reliable ? (bugs etc) Thanks. Sorry I should have specified that it's in the PHP environment. The short answer is Yes. Do

Re: Truly random 'groupie'

2005-08-25 Thread SGreen
Dan Bolser [EMAIL PROTECTED] wrote on 08/25/2005 08:03:23 AM: Hi, I think I saw this question being asked before, but I can't remember if their was a simple answer. If I have a table of two columns (PK and FK) with a one to many relationship, i.e. PK FK 1 a 2 a 3 a 4 b

Re: user defined exceptions

2005-08-25 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leigh wrote: Gleb Paharenko wrote: Hello. There was a question about exceptions recently. The answer might be helpful: http://lists.mysql.com/mysql/188048 Leigh [EMAIL PROTECTED] wrote: Hi All, I'm currently working on porting a

Re: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION'

2005-08-25 Thread Florian Burkart
Hey Gleb, thanks for taking your time! php.ini: ; As of 4.0b4, PHP always outputs a character encoding by default in ; the Content-type: header. To disable sending of the charset, simply ; set it to be empty. ; ; PHP's built-in default is text/html default_mimetype = text/html

Re: MinGW and MySQL

2005-08-25 Thread Pooly
Hi, MinGW is the GCC compiler for Win32 : http://www.mingw.org/ I get the mysql API working using the comments on this bug : http://bugs.mysql.com/bug.php?id=8059 2005/8/23, Michael Monashev [EMAIL PROTECTED]: Hello P I'm using QT4.0 which works with MinGW. What is the MinGW ? Database

Re: UK Bank Holidays

2005-08-25 Thread Pooly
Hi, I guess you have to maintain a table of bank holidays separately, that's the common setup. I don't know any application that can do it (even Excel don't do IIRC). Moreover, bank holidays can depend on your bussiness... 2005/8/25, Shaun [EMAIL PROTECTED]: Hi, I need to work out number of

Re: MysqlI

2005-08-25 Thread Stephen Moretti
Bill wrote: Hi Did someone use MySQLI in production environment ? Is the transactions aspect reliable ? (bugs etc) Thanks. Sorry I should have specified that it's in the PHP environment. mySQLi is a part of PHP, so you might be better asking this question over there, but mySQLi

Re: UK Bank Holidays

2005-08-25 Thread Raz
Shaun, This is a great opportunity for you to be creative and... I guess you have to maintain a table of bank holidays separately, ...add some of your own in. Brill! Raz ;) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: UK Bank Holidays

2005-08-25 Thread Peter Brawley
Shaun Is MySQL aware of UK Bank Holidays Nope. or do I have to create a separate table and keep it updated with Bank Holiday dates? Yep. PB - Shaun wrote: Hi, I need to work out number of business days worked by staff in our company i.e. Available days = Days in year -

Re: create serial number by select

2005-08-25 Thread Pooly
Hi, Why not adding an auto_increment column to your data ? 2005/8/25, Gyurasits Zoltán [EMAIL PROTECTED]: Hello All! I have a little problem. I can't do serial number in result of select. Example: TABLE1 value -- res1 res2 res3 SELECT (??), value FROM

RAID/MySQL configuration question

2005-08-25 Thread Curious George
G'morning all! (Using Red Hat Linux Enterprise 4.1) I have a Dell PowerEdge 2800 with a PERC 4 RAID controller. The RAID controller has one RAID 1 mirror and one RAID 5 stripe volume created. We installed most of the OS stuff on the RAID 1 set and the /usr/local and /var on the RAID 5 set

Re: create serial number by select

2005-08-25 Thread Jason Pyeron
On Thu, 25 Aug 2005, Pooly wrote: Why not adding an auto_increment column to your data ? 2005/8/25, Gyurasits Zoltán [EMAIL PROTECTED]: I can't build serial number in table1! Because he is not allowe to modify the table, pick any reason. --

Re: RAID/MySQL configuration question

2005-08-25 Thread Gary Richardson
My guess is that the RAID has nothing to do with it -- it seems very unlikely. In any case, if you want top performance out of your raid, you may want to change things up. You'd get better performance if you didn't use RAID5. Use RAID1 or RAID10 for your data drives. RAID5 is slower than these

Re: create serial number by select

2005-08-25 Thread Jason Pyeron
Are you using MySQL database server? On Thu, 25 Aug 2005, [ISO-8859-1] Gyurasits Zoltán wrote: Hi, Yes! And the SELECT contain some table! SELECT (??) FROM table1 INNER JOIN table2 I have a problem with the follow solution: SET @count:=0; SELECT @count:[EMAIL PROTECTED] AS

How do you change rows to columns?

2005-08-25 Thread Mark Ahlstrom
Would anyone have a good idea on how to change rows to columns? I'm creating a report where I have counts per hour. I can produce +--+---+ | hour | count | +--+---+ |0 | 1 | |1 | 0 | |2 | 1 | |3 | 0 | |4 | 0 | |5 | 0 | |6 |

Re: RAID/MySQL configuration question

2005-08-25 Thread Jason Pyeron
On Thu, 25 Aug 2005, Gary Richardson wrote: My guess is that the RAID has nothing to do with it -- it seems very unlikely. In any case, if you want top performance out of your raid, you may want to change things up. You'd get better performance if you didn't use RAID5. Use RAID1 or RAID10 for

RE: How do you change rows to columns?

2005-08-25 Thread Jay Blanchard
[snip] Would anyone have a good idea on how to change rows to columns? I'm creating a report where I have counts per hour. I can produce +--+---+ | hour | count | +--+---+ |0 | 1 | |1 | 0 | |2 | 1 | |3 | 0 | |4 | 0 | And then tack on an

Re: create serial number by select

2005-08-25 Thread Gyurasits Zoltán
Hi, Yes! And the SELECT contain some table! SELECT (??) FROM table1 INNER JOIN table2 I have a problem with the follow solution: SET @count:=0; SELECT @count:[EMAIL PROTECTED] AS `count`, `value` FROM `table`; I can't execute more select in my system. (Delphi software) :( Only 1

MySQL 4.1.14 has been released

2005-08-25 Thread Joerg Bruehe
Hi, MySQL 4.1.14, a new version of the popular Open Source Database Management System, has been released. The Community Edition is now available in source and binary form for a number of platforms from our download pages at http://dev.mysql.com/downloads/ and mirror sites. Note that not all

Server-side/prepared statements and CR_SERVER_GONE

2005-08-25 Thread Oliver Smith
It seems that the implementation of server-side or prepared statements is significantly less robust than client-side prepared statements and other connection-dependent parts of MySQL, which means that they are going to be a pain in the backside to work with. Previously MySQL features have

Re: MySQL

2005-08-25 Thread Bill
Hi Shawn The short answer is Yes. Do you want a list of companies from the Fortune 100 or are you interested in a particular business area? There are some huge names (http://www.mysql.com/customers/) that use MySQL for critical, public-facing, and infrastructure applications. Many of them

Re: MySQL

2005-08-25 Thread SGreen
news [EMAIL PROTECTED] wrote on 08/25/2005 01:39:20 PM: Hi Shawn The short answer is Yes. Do you want a list of companies from the Fortune 100 or are you interested in a particular business area? There are some huge names (http://www.mysql.com/customers/) that use MySQL for critical,

Re: MySQL

2005-08-25 Thread Bill
Hi Shawn, Are transactions stable and supported (production ready) in MySQL? Yes, with one caveat. You must keep your data in InnoDB tables in order to get full commit/rollback support. MyISAM does not support automatic rollbacks. Is mysqli_xx written to properly use the built-in transaction

Re: How do you change rows to columns?

2005-08-25 Thread Gleb Paharenko
Hello. Similar question was asked recently. See: http://lists.mysql.com/mysql/187940 Mark Ahlstrom [EMAIL PROTECTED] wrote: Would anyone have a good idea on how to change rows to columns? I'm creating a report where I have counts per hour. I can produce +--+---+ | hour

number formating

2005-08-25 Thread Kemin Zhou
Here I have a table column defined as integer type. it stores number from 1 to the hundred range (3 digits). For nice output (without using any external programming languages), I would want the printed type to have zerofill. One way to do it is to convert the type of the column to the

Is this a permissions problem?

2005-08-25 Thread Matthew Stuart
Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [MySQL][ODBC 3.51 Driver]Access denied for user: '@localhost' to database 'client_db1' I am having trouble getting any MySQL site to work on my local PC, but they work fine remotely. I have just changed PC and now have IIS whereas

Re: number formating

2005-08-25 Thread Michael Stassen
Kemin Zhou wrote: Here I have a table column defined as integer type. it stores number from 1 to the hundred range (3 digits). For nice output (without using any external programming languages), I would want the printed type to have zerofill. One way to do it is to convert the type of the

RE: Trigger exception handling

2005-08-25 Thread Burke, Dan
I don't think this is really what I'm looking for. What I need is to be able to perform certain validation on the data from within the trigger. If that validation fails, then I need the trigger to abort with an error. The handling below seems to just handle if there's a SQL error. I need to

Re: Is this a permissions problem?

2005-08-25 Thread SGreen
Matthew Stuart [EMAIL PROTECTED] wrote on 08/25/2005 03:26:51 PM: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [MySQL][ODBC 3.51 Driver]Access denied for user: '@localhost' to database 'client_db1' I am having trouble getting any MySQL site to work on my local PC, but they

RE: Trigger exception handling

2005-08-25 Thread SGreen
Burke, Dan [EMAIL PROTECTED] wrote on 08/25/2005 03:42:18 PM: I don't think this is really what I'm looking for. What I need is to be able to perform certain validation on the data from within the trigger. If that validation fails, then I need the trigger to abort with an error. The

RE: Trigger exception handling

2005-08-25 Thread Burke, Dan
Thank you for your response. I understand that stored procedures and triggers are very much new to MySQL. In fact, this has been an eagerly awaited feature by my management as a means to remove our dependence on that budget eater (Oracle) (and myself for personal projects). I was hoping that

Intelligent Converters product: MSSQL-to-MySQL

2005-08-25 Thread Ryan Stille
Has anyone ever used this MSSQL-to-MySQL converter? It's pretty reasonable at $40, and the demo output I got looked pretty good. But I wanted to see if there is anything I should be weary about. http://www.convert-in.com/mss2sql.htm Thanks, -Ryan -- MySQL General Mailing List For list

Per-thread memory use question

2005-08-25 Thread Pete Harlan
Hi, This formula shows up in a few places (this is from http://dev.mysql.com/books/hpmysql-excerpts/ch06.html): min_memory_needed = global_buffers + (thread_buffers * max_connections) where thread_buffers includes the following: sort_buffer

The Intel MySQL compiled Server

2005-08-25 Thread Dyego Souza Dantas Leal
Hello guys.. I want to use INTEL SHARED MySQL 4.0.25 - Pro with innodb tables on PRODUCTION SERVER DELL 2600 The Linux Kernel is 2.6.12 and the hardware is DUAL XEON 2.4 HT iwth 4 GB of RAM (i'm using raw partitions feature on innodb tables) this is a secure option ? the Intel version of

segmentation fault using mysql

2005-08-25 Thread Ed Kasky
Running MySql 4.1.14 on RedHat 7.2 I just upgraded from 4.1.13 to 4.1.14 and was am experiencing problems using the mysql client. # /usr/local/mysql/bin/mysql -h localhost -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 34 to server version:

45 minutes to check table to complete

2005-08-25 Thread Peter J. Schoenster
Hi, I've got a database that is closed to 7G. I'm using the Standard 4.1.14 version. The table was corrupt and I had to do a lot of moving of data to free up enough space on the partition as I discovered I needed at least twice the database size to do a recover. Well, using myisamchk -o

Re: INSERT IGNORE Doesn't Seem To Work

2005-08-25 Thread Hal Vaughan
On Thursday 25 August 2005 04:44 am, [EMAIL PROTECTED] wrote: Hal Vaughan [EMAIL PROTECTED] wrote on 24/08/2005 17:41:36: # Okay, so INSERT IGNORE only works if I am avoiding duplicate keys. Is there any way to use INSERT the way I thought INSERT IGNORE worked -- in other words is

Re: INSERT IGNORE Doesn't Seem To Work

2005-08-25 Thread Peter Brawley
Hal, *IF* INSERT IGNORE worked ... INSERT IGNORE _does_ work exactly as documented in the manual: "If you specify the IGNORE keyword in an INSERT statement, errors that occur while executing the statement are treated as warnings instead. For example, without IGNORE, a row that duplicates an

Storing underscores ( _ ) in database tables

2005-08-25 Thread David Blomstrom
(Sorry if this is a repeat; I think my first post didn't go through.) I'm still stuck on the problem I asked about a day or two ago. I'm working on a page at http://www.geozoo.org/stacks/ that draws data from a table that lists animal taxons (orders, families, species, etc.) in a child-parent