MySQL select query - newbie

2006-04-22 Thread Nanu Kalmanovitz
Hi! System is Novell SBS 6.5 sp1 with Apache 2.0.48, MySQL ver. 4.0.15a, PHP 4.2.3. We try to define a select query that takes the values of the variables 'varKoshi' and 'varKvish' based on the following 4 tables: 'varKoshi' >>vv<<< 'varKvish'

Re: commit problem

2006-04-22 Thread balaraju mandala
Thank you again Prassad, and Dilip.

Re: WHERE doesn't work

2006-04-22 Thread Tom Lobato
From: "Peter Brawley" <[EMAIL PROTECTED]> Tom, > UPDATE command is not working for only the record that I want, but for >all in the table. I sees WHERE is not interpretated by Mysql server. At >least the result is identic to it. For example, If my php execute > UPDATE clientes SET

Re: WHERE doesn't work

2006-04-22 Thread Peter Brawley
Tom, > UPDATE command is not working for only the record that I want, but for >all in the table. I sees WHERE is not interpretated by Mysql server. At >least the result is identic to it. For example, If my php execute > UPDATE clientes SET tipo='r', nome_fantasia='cc', estado='24' >W

Re: WHERE doesn'r works

2006-04-22 Thread Rhino
- Original Message - From: "Tom Lobato" <[EMAIL PROTECTED]> To: Sent: Saturday, April 22, 2006 4:18 PM Subject: Re: WHERE doesn'r works From: "Rhino" <[EMAIL PROTECTED]> Most of the time, when I see a column named 'id', it is defined as an integer. If _your_ 'id' column is defined

Re: Newbie Locking Question

2006-04-22 Thread nigel wood
David T. Ashley wrote: Nigel wrote: If you can't or won't do this properly by using a transactional table and begin/commit at least look at using get_lock() based guard conditions which only lock a string leaving the database accessable. Whatever you do if you client is php install a shutdo

Re: WHERE doesn'r works

2006-04-22 Thread Tom Lobato
From: "Rhino" <[EMAIL PROTECTED]> Most of the time, when I see a column named 'id', it is defined as an integer. If _your_ 'id' column is defined as an integer, then the reason your WHERE clause is failing is very simple: Your WHERE clause is looking for all the rows where the 'id' value is a ch

RE: Newbie Locking Question

2006-04-22 Thread David T. Ashley
Nigel wrote: > If you can't or won't do this properly by using a transactional table > and begin/commit at least look at using get_lock() based guard > conditions which only lock a string leaving the database accessable. > Whatever you do if you client is php install a shutdown handler to clean >

Re: please help, can not delete database

2006-04-22 Thread John Hicks
Randy Paries wrote: Hello, Not sure what is going on i have mysql Ver 12.22 Distrib 4.0.17, I have a database that i can not delete. i do this #mysqladmin drop billmax -u admin --password Enter password: Dropping the database is potentially a very bad thing to do. Any data stored in the databa

Re: Newbie Locking Question

2006-04-22 Thread nigel wood
David T. Ashley wrote: Hi, I'm doing a PHP application, and there are just a few instances where I need to do atomic operations on more than one table at a time and I can't express what I want to do as a single SQL statement. What I'm trying to guard against, naturally, is race conditions when

Newbie Locking Question

2006-04-22 Thread David T. Ashley
Hi, I'm doing a PHP application, and there are just a few instances where I need to do atomic operations on more than one table at a time and I can't express what I want to do as a single SQL statement. What I'm trying to guard against, naturally, is race conditions when more than one process is

Fw: please help, can not delete database

2006-04-22 Thread Rhino
I'm putting this back on the list where it belongs; that enables everyone to help and to learn from the discussion, either now or in the future via the list archive. -- Ahh, so you've tried to re-create the database after it appeared to be safely dropped! You didn't say that in your note so I

Re: Why does this query takes a lot of time

2006-04-22 Thread Adam Wolff
On Apr 22, Philippe Poelvoorde wrote: > alter table s add index(login_name); > alter table c add index(recordID); To make this much faster, I think you may want: alter table s add index(recordID, login_name); alter table c add index(recordID); Because after the join, the engine can use the

Re: Why does this query takes a lot of time

2006-04-22 Thread Philippe Poelvoorde
2006/4/22, abhishek jain <[EMAIL PROTECTED]>: > Dear Friends, > I have two table joined by the followng query, the problem is this simple > query takes a lot of time greater than 10 mins depending on the number of > records, Pl. help me find out the reason: > Table 1: > id_key primary and auto incr

Re: How to Find Most Recent Autoincrement Index Assigned???

2006-04-22 Thread Rhino
- Original Message - From: "David T. Ashley" <[EMAIL PROTECTED]> To: Sent: Saturday, April 22, 2006 12:53 AM Subject: How to Find Most Recent Autoincrement Index Assigned??? I'm using PHP, and I sometimes INSERT new records in a table. MySQL assigns a new autoincrement int field o

Re: please help, can not delete database

2006-04-22 Thread Rhino
What makes you think the delete of the database failed? It looks like the message from the DROP command indicates that the database was dropped successfully. -- Rhino - Original Message - From: "Randy Paries" <[EMAIL PROTECTED]> To: Sent: Saturday, April 22, 2006 9:22 AM Subject: pl

Re: WHERE doesn'r works

2006-04-22 Thread Rhino
- Original Message - From: "Tom Lobato" <[EMAIL PROTECTED]> To: Sent: Saturday, April 22, 2006 4:03 AM Subject: Re: WHERE doesn'r works From: <[EMAIL PROTECTED]> you really need to show your php code and the output from an echo of the update line so that people can try to spot wha

please help, can not delete database

2006-04-22 Thread Randy Paries
Hello, Not sure what is going on i have mysql Ver 12.22 Distrib 4.0.17, I have a database that i can not delete. i do this #mysqladmin drop billmax -u admin --password Enter password: Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed.

Why does this query takes a lot of time

2006-04-22 Thread abhishek jain
Dear Friends, I have two table joined by the followng query, the problem is this simple query takes a lot of time greater than 10 mins depending on the number of records, Pl. help me find out the reason: Table 1: id_key primary and auto increment recordID varchar(100) login_name varchar(255) blah b

Why does this query takes a lot of time

2006-04-22 Thread WEBBEE . BIZ
Dear Friends, I have two table joined by the followng query, the problem is this simple query takes a lot of time greater than 10 mins depending on the number of records, Pl. help me find out the reason: Table 1: id_key primary and auto increment recordID varchar(100) login_name varchar(255) blah b

Re: MySQL 4.1.18-64 bit won't start after JS2E update on OS X

2006-04-22 Thread Geoffrey Sneddon
On 22 Apr 2006, at 06:30, Michael Stassen wrote: Are you saying the update changed the ownership, group, or permissions? I have had OS X updates change the permissions on / tmp 2 or 3 times in the past, but there was no change for me when I just installed JS2E 5.0 Release 4 update. Also, w

Re: How to Find Most Recent Autoincrement Index Assigned???

2006-04-22 Thread abhishek jain
Hi, Actually i update(increment by 1 ) a value in a table with only one row, ie. update table1 set col = col+1; Can i get the updated value without diong select in the same query with update. Because if i run Select after that than some time is lost and in the mean time any other process updates t

MySQL 5.0.20a has been released

2006-04-22 Thread Joerg Bruehe
Hi, MySQL 5.0.20a, 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

Re: How to Find Most Recent Autoincrement Index Assigned???

2006-04-22 Thread mysql
>From 'Section 13.5.3 SET Syntax' of the 5.0.18 ref manual: IDENTITY = value The variable is a synonym for the LAST_INSERT_ID variable. It exists for compatibility with other database systems. You can read its value with SELECT @@IDENTITY, and set it using SET IDENTITY. INSERT_ID = value

Re: WHERE doesn'r works

2006-04-22 Thread Tom Lobato
From: <[EMAIL PROTECTED]> you really need to show your php code and the output from an echo of the update line so that people can try to spot what you're doing wrong. from what i've seen, people are basically just guessing at the issue with you saying "tried that, didn't work". updating mysql r

Re: describe table : improvement

2006-04-22 Thread mysql
Thankyou Michael. I'm trying to work my way through the 5.0.18/19 manual, but I seem to have missed that. Regards Keith In theory, theory and practice are the same; in practice they are not. On Sat, 22 Apr 2006, Michael Stassen wrote: > To: [EMAIL PROTECTED] > From: Michael Stassen <[EMAIL

Re: WHERE doesn't work

2006-04-22 Thread Tom Lobato
From: <[EMAIL PROTECTED]> you really need to show your php code and the output from an echo of the update line so that people can try to spot what you're doing wrong. from what i've seen, people are basically just guessing at the issue with you saying "tried that, didn't work". updating mysql

WHERE doesn't work

2006-04-22 Thread Tom Lobato
From: "Michael Stassen" <[EMAIL PROTECTED]> With all due respect, there is almost certainly an error in your code. I've been on this list for years, and so far as I can recall, every instance of mysql appearing to do something strange from php turned out to be a flaw in the php code, not a probl