Embedded MySQL Manager

2007-05-31 Thread Martin Lancaster
Hi all, I am wondering if anyone can recommend an application that will allow me to manage an Embedded MySQL database similar to the operation of Navicat or EMS SQL Manager on a normal MySQL server instance? Thanks in advance Martin -- --

Re: MySQL in multi-threaded environment

2007-05-31 Thread Geoffroy Cogniaux
Hi, Assuming that you are using a multithread safe libmysql, I suggest you to have a look at your error code first: Error code 1064 suggests that you send a bad query to mysql, maybe your pool-query isn't indeed MT safe, so manipulating this variable requires a mutex. Error code 1062 suggests

Re: MySQL in multi-threaded environment

2007-05-31 Thread Ace
Thanks Geoffroy! I will check this and let you know if problem persists. -- Cheers, Rajan On 5/31/07, Geoffroy Cogniaux [EMAIL PROTECTED] wrote: Hi, Assuming that you are using a multithread safe libmysql, I suggest you to have a look at your error code first: Error code 1064 suggests that you

Populating a database

2007-05-31 Thread Officelink
Hi everyone, I've just created the structure of a database and am deciding the best way to insert the data. The database includes a number of tables that have foreign keys referencing primary keys in other tables. The application I'm building will make use of the data in one of the following ways

Re: Data types and reading in data

2007-05-31 Thread Olaf Stein
You could write a little script that loops through your lines in the csv file, makes the changes to fields you need and insert into the database then. This gives you full control over the new table structure (order,types, etc) Olaf On 5/31/07 12:02 AM, David Scott [EMAIL PROTECTED] wrote:

Re: help converting trigger

2007-05-31 Thread Chris Hoover
Any help on how to do this in mysql On 5/30/07, Chris Hoover [EMAIL PROTECTED] wrote: I have the following trigger in Postgresql, how can we do this in Mysql? CREATE TRIGGER tr_encounter_lab_order_upd AFTER UPDATE ON encounter_lab_order FOR EACH ROW EXECUTE PROCEDURE

SAN backend for DB's

2007-05-31 Thread B. Keith Murphy
So here is the brief situation. We have a coraid (www.coraid.com) SAN unit - the 1520 I believe. It is ATA-over-ethernet. Right now we have a about 500 gigs of data spread across five servers. To simplify things I would like to implement the coraid on the backend of these servers. Then

Why won't this work?

2007-05-31 Thread Chris Hoover
Why does this not work? How can I do it? CREATE TRIGGER tr_encounter_lab_order_upd AFTER UPDATE ON encounter_lab_order FOR EACH ROW if ( new.DX_CODE != old.DX_CODE or ( new.DX_CODE is null and old.DX_CODE is not null) or ( new.DX_CODE is not null and

mysqldump not consistent

2007-05-31 Thread Ben Clewett
Dear MySql, Using 5.0.26 I am trying to get a consistent image of some tables using mysqldump. This is for replication. All my tables are InnoDB. I am using: # mysqldump h host \ --master-data=1 \ --single-transaction \ database I was hoping that the

Moving Data between Tables

2007-05-31 Thread Kebbel, John
I moved information about our school locks (serial numbers, combinations, student, etc) from FileMaker to MySQL into a table called lockers and wrote PHP pages so our teachers could record the locks returned at the end of the year. Unfortunately, I missed transferring close to 200 locks. I

mysql old 4.* query fails on 5.*

2007-05-31 Thread consiglieri
Hi I have upgraded to 5.0.22 and after a while I discovered that the following query no longer works.. it fails claiming Unknown column 'K.Klient_ID' in 'on clause' which seems entirely wrong. The query is as follows select Td.Datum, Td.Text AS Action, Td.Enhet AS Tid, P.Fornamn AS Person

Re: mysql old 4.* query fails on 5.*

2007-05-31 Thread Baron Schwartz
Hi, consiglieri wrote: Hi I have upgraded to 5.0.22 and after a while I discovered that the following query no longer works.. it fails claiming Unknown column 'K.Klient_ID' in 'on clause' which seems entirely wrong. The query is as follows select Td.Datum, Td.Text AS Action, Td.Enhet AS

Re: Moving Data between Tables

2007-05-31 Thread Baron Schwartz
Hi John, Kebbel, John wrote: I moved information about our school locks (serial numbers, combinations, student, etc) from FileMaker to MySQL into a table called lockers and wrote PHP pages so our teachers could record the locks returned at the end of the year. Unfortunately, I missed

Determining number of vowels in a string

2007-05-31 Thread Brent Baisley
I'm trying to do a select that will return the number of vowels/consonants present in a string for each record. I thought a simple grep was the way to go, but it appears the grep functions only tell you if a string is present. I would even settle for a grep replace. Just replace the vowels with

RE: Moving Data between Tables

2007-05-31 Thread Kebbel, John
I hope you're not about to try this for the first time on your production data :-) I dumped the lockers table before beginning my experiments. If I had trashed lockers2 (my experimental file) in the process, I would have truncated it and re-inserted the 1492 records from my batch file.

Re: Determining number of vowels in a string

2007-05-31 Thread Barry Newton
I'd rather do it in a sql statement rather than using a scripting language. I'm thinking you might be able to do one select, accumulating 5 siubstring counts (a,e,i,o,u) into 5 variables, and then sum the counts? I'll leave the testing to you. . .:-) Barry Newton -- MySQL General

Re: Determining number of vowels in a string

2007-05-31 Thread Brent Baisley
Yeah, I was sort of heading that route. But I would also like to determine a count of the numbers in a string too. Certainly the query is doable, but it's unwieldy. What I have so far: SELECT fld, @FLDLEN:=char_length(fld) fld_len, @FLDLEN-char_length(replace(fld,'o',''))[EMAIL

Re: Determining number of vowels in a string

2007-05-31 Thread Reinhardt Christiansen
- Original Message - From: Brent Baisley [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Thursday, May 31, 2007 1:50 PM Subject: Determining number of vowels in a string I'm trying to do a select that will return the number of vowels/consonants present in a string for each record.

Re: CSV import

2007-05-31 Thread Mogens Melander
Import your CSV-data into a temporary table, using mysqlimport, and throw a bit of SQL at it might do the trick, but then again, not knowing the layout of your table, nor the data you want to import, i'm only guessing. On Mon, May 28, 2007 16:57, Sharique uddin Ahmed Farooqui wrote: Both

MySQL improvement offer. Sand-box

2007-05-31 Thread Sergey Ivanov
Hello! It is not actually bug, but some improvement I'd like to offer. Situation: I have some site on a shared UNIX-hosting, so that's why I have user account with no FILE privilege, so I can't use LOAD DATA INFILE even if this file is in my home (for my site) directory. But it seems to me

Re: Determining number of vowels in a string

2007-05-31 Thread Brent Baisley
Everything is in english. But to generalize it, I'm trying to count the number of times certain characters appear in a string. Using char_length instead of just length will guard against double byte characters being counted more than once when determining string length. But it still seems to

Padding result

2007-05-31 Thread Ashley M. Kirchner
Is there a way to automatically pad a query result? For example: select id, user from table +-+--+ | id | user | +-+--+ | 3 | Tinker Bell | | 11 | Peter Pan| | 7 | Dumbo| | 121 | Mickey Mouse |

Re: Padding result

2007-05-31 Thread Baron Schwartz
Hi, Ashley M. Kirchner wrote: Is there a way to automatically pad a query result? For example: select id, user from table +-+--+ | id | user | +-+--+ | 3 | Tinker Bell | | 11 | Peter Pan| | 7 | Dumbo| |

Re: Padding result

2007-05-31 Thread Baron Schwartz
Ashley M. Kirchner wrote: Is there a way to automatically pad a query result? For example: select id, user from table +-+--+ | id | user | +-+--+ | 3 | Tinker Bell | | 11 | Peter Pan| | 7 | Dumbo| | 121 |

Re: SAN backend for DB's

2007-05-31 Thread Scott Tanner
I think you'll need to do a lot of testing to yourself to find the right answer to that. The number of disks, type of disks, and raid configuration will have the most effect on performance. Personally, we had roughly 15% increase in performance from ditching our EMC clarion and going with

Re: Padding result

2007-05-31 Thread Mogens Melander
How about: SELECT LPAD(id,5,'1'),user from table; LPAD(str,len,padstr) Returns the string str, left-padded with the string padstr to a length of len characters. If str is longer than len, the return value is shortened to len characters. mysql SELECT LPAD('hi',4,'??'); - '??hi' mysql