replace/temp tbl question...

2006-08-10 Thread bruce
hi... can someone tell me if this should work in theory... basically, i'm looking to get a bunch of rows from my initial table, based on the value of a given column/field. i'd then like to do a complete replace/update on the values in the temp table. finally, i'd like to write everything in the r

Why can't output to error log file when INNODB happened ERROR1205?

2006-08-10 Thread nakai
Why can't output to error log file when INNODB happened ERROR1205? All server error message is output to error log file, isn't it? -- create table test (id int ,name text)engine=innodb; insert into test values ( 1, 'test'); -- Pattern 1 -- CLIENT A: begin; select * f

Why can't output to error log file when INNODB happened ERROR1205?

2006-08-10 Thread nakai
Why can't output to error log file when INNODB happened ERROR1205? All server error message is output to error log file, isn't it? -- create table test (id int ,name text)engine=innodb; insert into test values ( 1, 'test'); -- Pattern 1 -- CLIENT A: begin; select * f

insert/replace question...

2006-08-10 Thread bruce
hi. i have the following that works... in that it does a replace on the row. replace into appTBL (appName, universityID) values(%s,%s)... i'm trying to figure out how to do the replace on the row if a given column is not equal to a certain value.. i've tried... replac

RE: cell colors PHP/MySQL

2006-08-10 Thread Daevid Vincent
No. a switch requires 'testing' the condition, and for every row. The CSS way is much more efficient (and preferred for best practices) as it's more flexible. You can change the CSS file easily without changing any PHP code. But the speed will be the biggest improvement. A wise man once told me,

Re: inner outer joins

2006-08-10 Thread Chris
Brian E Boothe wrote: hi all Can someone provide a small project using inner and outter joins with querys thanks alot create table t1 (id int); create table t2 (id int); This will find everything that has an entry in both tables: select * from t1 inner join t2; This will find records that are

Re: SELECT duplicate set of rows

2006-08-10 Thread Chris
James Neff wrote: Greetings, I need help with a select statement that finds duplicate sets of rows. I have a table like so: batch_data --- ID - int (auto inc) Record ID - int DataValue - VarChar(99) DataType - int With a sample of data like this: 1 100 1122A 1 2

Re: delimiter in mysql client

2006-08-10 Thread Chris
Asif Lodhi wrote: Hi, I am replying back to my own post. Sorry, I forgot to mention that I am using mysql client on WinXP Pro SP2 and MySQL-5.0.22 is installed on the same machine. Any hints as to why mysql client is showing this behavior? The only thing you're changing is the delimiter? Ar

Re: Doubt on Index Merge??

2006-08-10 Thread Chris
Ratheesh K J wrote: Hello all, I have a doubt on Index Merge. We are currently using MySQL server 4.1.11. As a part of DB management I am currently doing an analysis on all the Tables. While looking into the table structures, their columns and Indexes I found that most of the tables have a

Re: Table size??

2006-08-10 Thread Chris
Ratheesh K J wrote: Helo all, Just wanted to know when should a Table be considered for partitioning ( or should it be archiving ). Almost all of our tables are of Innodb type. I am looking for an estimate rather than a "Depends on situation" kind of an answer. We have few of our table swhic

Re: Adding index -- Need help

2006-08-10 Thread Carlos Proal
Remember that if you dont use an index on a colum and you search by that criteria, there would be a whole table scan :(. Its recommended that you always index those columns that appear on a search and/or an order (where column_a='yyy' order by column_b) and those involved on joins; generally spea

Re: Can a row be refered using row number?

2006-08-10 Thread Paul DuBois
At 14:13 +0530 8/10/06, <[EMAIL PROTECTED]> wrote: Hi All, Is there any way to refer a row based on the row number or row count? I just the effect as below... E.g. UPDATE TBL_NAME SET COL_NAME = xyz WHERE ROW_NO=4 Or SELECT COL_NAME FROM TBL_NAME WHERE ROW_NO=5 No, because

Re: Can a row be refered using row number?

2006-08-10 Thread John Meyer
Bartis, Robert M (Bob) wrote: > Why would you want to do this? As data moves around within the table the > updates will be in error. Wouldn't it be easier to assign a unique key to > each row, search for the key or unique set of information and update the > resulting row? > > Bob I don't know,

Re: How to create a table of dates?

2006-08-10 Thread Peter Brawley
>So if the date range is '2001-01-15' to '2003-04-01' then it would generate >approx 800 rows with dates between these 2 ranges. I can't seem to figure >out how to do it without writing a program. See Dates/'Make a calendar table at http://www.artfulsoftware.com/queries.php. PB - mos

RE: Can a row be refered using row number?

2006-08-10 Thread Bartis, Robert M (Bob)
Why would you want to do this? As data moves around within the table the updates will be in error. Wouldn't it be easier to assign a unique key to each row, search for the key or unique set of information and update the resulting row? Bob -Original Message- From: [EMAIL PROTECTED] [mai

How to create a table of dates?

2006-08-10 Thread mos
This one has me puzzled. All I need to do is create a table of dates, one date per row, from a starting to ending date. So if the date range is '2001-01-15' to '2003-04-01' then it would generate approx 800 rows with dates between these 2 ranges. I can't seem to figure out how to do it without

Re: Access mySQL database across Internet

2006-08-10 Thread Dan Buettner
A good point to make here is that averages are generally a poor calculation to use when planning for load, since your systems have to handle the peaks as well as the average. I know this, fought a number of fights over it at my last job - don't know why I just quoted you averages! If 99% of your

Re: Access mySQL database across Internet

2006-08-10 Thread Dan Buettner
No, 1000 hits / day isn't terribly high traffic, if you're serving pretty normal "stuff". That averages out to a hit every 32 seconds or so during the course of an 8 to 5 business day, a hit every 86 seconds or so in a full day. No problems at that level. When you get to 1000 hits / minute, the

MySQL [bar]Camp

2006-08-10 Thread Jay Pipes
Hi all! Wanted everyone to know about an upcoming MySQL camp to be held the weekend of November 10th through 12th in Silicon Valley at a venue to be determined soon. Please hop over to the wiki at http://mysqlcamp.org and check it out. Feel free to add suggestions for topics, "sign" your name on

RE: Access mySQL database across Internet

2006-08-10 Thread Neil Tompkins
What would you assume to be high traffic ? 1000 hits per day or more ? > Date: Thu, 10 Aug 2006 13:05:11 -0500> From: [EMAIL PROTECTED]> To: [EMAIL > PROTECTED]> Subject: Re: Access mySQL database across Internet> CC: > mysql@lists.mysql.com> > Neil, in theory, this should work fine, given > s

Re: Lookup Table Question...

2006-08-10 Thread Dan Buettner
Mark, can you provide a sample of a query you're currently using to retrieve data from this table / joining on this table? Also, how big is this table? It may not be worth your time to change things around as this is a very simple structure and should remain speedy even if it grows pretty large.

Re: Access mySQL database across Internet

2006-08-10 Thread Dan Buettner
Neil, in theory, this should work fine, given sufficient bandwidth between the two sites. In practice, if it is a high traffic site generating a large number of connections, or a high traffic site pulling large pieces of data (BLOBs or TEXT) from the remote database, you may find performance to b

Lookup Table Question...

2006-08-10 Thread Mark Donovan
hello all this is my first post...I haven't been able to find a way to half my table size through a primary key relationship that can exist once. If I want to relate "person1 (id = 4)" to "person2 (id = 1)" I have have had good success with the following table below. However, if i

RE: MySQL Replication Binary Logs - How Long to Keep?

2006-08-10 Thread mark addison
On Thu, 2006-08-10 at 14:47 +1000, Logan, David (SST - Adelaide) wrote: > Hi Warren, > > I would generally keep the binary log until you have done a full backup. > Once that is done, all the transactions that are contained in those logs > are now committed and saved in your database backup. You

Re: joining tables

2006-08-10 Thread Peter Brawley
Reinhart, >So even the clients who have no entry in events on that day, but they have >an event in that specific month and year should be shown with a 0 value. Try ...FROM clients LEFT JOIN events... PB - Reinhart Viane wrote: Table1: events Durationworkdateclientid

Source code about user authentication in MySQL 5

2006-08-10 Thread Arjan Hulshoff
Can someone tell me where I can find the source code files whit th user authentication in it? I want to see if I can integrate LDAP authentication myself. _ Express yourself instantly with MSN Messenger! Download today - it's FREE!

joining tables

2006-08-10 Thread Reinhart Viane
Table1: events Durationworkdateclientidpersonid 60 2006-01-03 1 51 48 2006-01-03 2 51 167 2006-01-03 4 51 Table2: clients Clientidname 1 client1 2

Access mySQL database across Internet

2006-08-10 Thread Neil Tompkins
Hi We have a mysql database hosted with a IIS server on the same network accessible over the Internet. Now we want to set-up a new website with another ISP therefore located in a different datacenter. Has anyone had any experience of this. What performance issues would I get if I access t

Re: Can a row be refered using row number?

2006-08-10 Thread mos
At 03:43 AM 8/10/2006, you wrote: Hi All, Is there any way to refer a row based on the row number or row count? I just the effect as below... E.g. UPDATE TBL_NAME SET COL_NAME = xyz WHERE ROW_NO=4 Or SELECT COL_NAME FROM TBL_NAME WHERE ROW_NO=5 Regards, Ravi K Ravi

Re: Get a Numeric Zero instead of NULL in SELECT

2006-08-10 Thread Brent Baisley
The only way to force a numeric zero instead of a NULL is to alter the table. Don't allow NULL's in the field and set a default value of 0. However, you then lose the ability to determine is a value was actually entered or if 0 was entered. Don't know if that matter to you. Otherwise, you can u

RE: forcing leading 0 for numeric fields

2006-08-10 Thread George Law
Mark, Perfect! Thanks!! I altered my table to specify ZEROFILL and that did the the trick. -- George >>>-Original Message- >>>From: Mark Leith [mailto:[EMAIL PROTECTED] >>>Sent: Wednesday, August 09, 2006 3:56 PM >>>To: Jonathan Mangin >>>Cc: George Law; MYSQL General List >>>Subje

Re: how to store quotes in mysql?

2006-08-10 Thread Renato Golin
> thanks for your response. > > I'm already working on the php "part" but just wondered how "bad" is to > have backslash in front of quotes. It's bad in the sense that you will have to predict every single event (character) from the input and act accordingly. The API writers had predicted them al

Re: Get a Numeric Zero instead of NULL in SELECT

2006-08-10 Thread Asif Lodhi
Hi, I am replying to my own post to tell you that now I am using CASE WHEN {condition} THEN END construct to check for NULL and returning numeric ZERO. On the face of it, CASE doesn't seem to be function - it's an operator - isn't? However, I would now like to ask you

Get a Numeric Zero instead of NULL in SELECT

2006-08-10 Thread Asif Lodhi
Hi, I have a query: insert into tmp2 (x) select ((t3.m * 100)+b.id ) as x2 fromtmp3 t3 LEFT JOIN (select ((max(x)) - ((max(x) div 100) * 100))+1 as pid from tmp2 where ((x div 100)=2147)

Re: Group by base on latest time field, possible?

2006-08-10 Thread Johan Höök
--- Begin Message --- Hi, what you want is probably described in: http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html /Johan The Nice Spider skrev: not works. it's still show same result. any idea? - Original Message - From: "Quentin Bennett" <[EMAIL PROTECT

Can a row be refered using row number?

2006-08-10 Thread ravi.karatagi
Hi All, Is there any way to refer a row based on the row number or row count? I just the effect as below... E.g. UPDATE TBL_NAME SET COL_NAME = xyz WHERE ROW_NO=4 Or SELECT COL_NAME FROM TBL_NAME WHERE ROW_NO=5 Regards, Ravi K The information contained in this electr

Insert ... Select Max() .. transactional Query optimization on an InnoDB table

2006-08-10 Thread Asif Lodhi
Hi, Using MySQL-5.0.22/Win-XP-SP2 and storing data in InnoDB tables. Clients connect from VB6. Enclosing all transactions in "START TRANSACTION ... COMMIT" statements from VB6 clients. I have the following query for a table tmp2 with a column x of data-type INT. Insert into tmp2(x,y,x) Se

installing mysql

2006-08-10 Thread jagdish gunjal
i m upgrading mysql from 3.23 to 4.1.8. there was packge conflict for so many files like /etc/my.cnf Also i installed shared-compat for removing such problems. Is there any solution? Regards Jagdish " Everyone has beauty but not everyone sees it."