Fwd: Fetch and updation in single step/query

2006-04-20 Thread abhishek jain
No i do not want an autoincrement key , as i want to be only one row in the table and it value gets incremented / updated and i to know whats its current value. -- Regards Abhishek Jain On 4/19/06, Michael Kruckenberg [EMAIL PROTECTED] wrote: Seems like what you need is an auto-increment key.

Re: How to remove muiltiple queries to a table at the same time

2006-04-20 Thread WEBBEE . BIZ
Hi all, I am using PHP and what i know is that without select statement in the query we can not fetch anything . I mean if we do not give select what will be the field headers. Pl. clarify how can we fetch rfom this query. UPDATE `table_name` SET `field`=`field`+1; Also can we lock and unlock

Re: Starting mysql through sudo

2006-04-20 Thread Barry
tuxlinsecure wrote: Hi, What binaries directory premissions are required to enable in sudo to start mysql Instance through sudo. Thanks, - How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates. You should ask on a sudo / Unix

Re: Starting mysql through sudo

2006-04-20 Thread Mark Sargent
tuxlinsecure wrote: Hi, What binaries directory premissions are required to enable in sudo to start mysql Instance through sudo. Thanks, Hi All, what user do you want to be able to start MySQL? Just add that user to your wheel group(be careful though, as that gives that user full power

Re: How to Verify Replication Status?

2006-04-20 Thread Eric Braswell
There are only a very limited set of circumstances where slaves could get out of sync, and if everything is set up right, it basically should not happen. See: http://dev.mysql.com/doc/refman/5.0/en/replication-rules.html And: http://dev.mysql.com/doc/refman/5.0/en/replication-features.html

Re: Run Apache/PHP/MySQL from CD?

2006-04-20 Thread Frank
Jay Paulson wrote: I have no idea if this is possible or not but is there a way to run Apache, PHP, and MySQL from a CD? I'd like it to be possible to run it on Windows, Mac OSX and *nix. If it is possible could someone point me in the right direction? Thanks! Hi Jay, I am currently

Re: describe table : improvement

2006-04-20 Thread Gilles MISSONNIER
hello, thank you for your answer, but this DO NOT work for me. I use MySQL 4.0.24 [ Linux Debian sarge stable ]. the FULL argument displays ONLY the Privileges, NOT the Comment, neither Collation. mysql CREATE TABLE a_table (a_column CHAR(30) COMMENT 'commentaire'); Query OK, 0 rows

Re: describe table : improvement

2006-04-20 Thread Gabriel PREDA
Sorry forgot to mention MySQL version 4.1.X This option is operational as of MySQL 4.1. (It is allowed but ignored in earlier versions.) -- Gabriel PREDA Senior Web Developer

RE: Document / Image (Blob) archival -- Best Practices

2006-04-20 Thread Tim Lucia
How about Alfresco as a C/DMS? (http://www.alfresco.com/) Our CEO read an article about Boise Cascade using this model and thought it would scale well for us. There is also this http://www.mysql.com/news-and-events/web-seminars/mysql-alfresco.php Which I didn't know about (or necessarily care

~Master Slave setup on the same machine~

2006-04-20 Thread Mohammed Abdul Azeem
Hi, Is it possible to configure a master and slave server on the same machine ? I have 3 instances of mysql running on the same server. I need to replicate a database from one server to other 2 servers. Any links or suggestions required regarding the same. Thanks in advance, Abdul.

getting unique results

2006-04-20 Thread ross
SELECT `Service type` FROM `service_providers` How do I get only unique results from this query. There are many services called 'cafe' for example but I only want one. R.

Re: getting unique results

2006-04-20 Thread Martijn Tonies
SELECT `Service type` FROM `service_providers` How do I get only unique results from this query. There are many services called 'cafe' for example but I only want one. Well, this could help: select distinct `service type` FROM `service_providers` Martijn Tonies Database Workbench -

Re: newbie optimization question

2006-04-20 Thread Philippe Poelvoorde
Hi, 2006/4/20, Adam Wolff [EMAIL PROTECTED]: Hi. I'm new to database optimization and I have a couple of questions. I have a table like this: +++-+-+ | id | fullname | email | user_id |

Re: describe table : improvement

2006-04-20 Thread mysql
Using MySQL 5.0.18 mysql use test1; Database changed mysql show tables; +-+ | Tables_in_test1 | +-+ | t1 | +-+ 1 row in set (0.00 sec) mysql show create table t1 \G * 1. row * Table: t1 Create

Re: describe table : improvement

2006-04-20 Thread Gabriel PREDA
COLUMN COMMENTs are not the same as TABLE COMMENT... For TABLE COMMENT you should use: SHOW TABLE STATUS LIKE 'table_name' *Gilles *(the starter of the thread) wanted COLUMN COMMENTs. -- Gabriel PREDA Senior Web Developer

Re: MySQL 3 to 5 upgrade

2006-04-20 Thread Chris Sansom
At 19:14 +0100 14/4/06, Philippe Poelvoorde wrote: Have a serious look at : http://dev.mysql.com/doc/refman/4.1/en/upgrading-from-3-23.html http://dev.mysql.com/doc/refman/4.1/en/upgrading-from-4-0.html http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html There is many things likely

Re: newbie optimization question

2006-04-20 Thread Alexey Polyakov
On 4/20/06, Adam Wolff [EMAIL PROTECTED] wrote: How can I optimize the case where I filter on one key but sort on another? This is fast: SELECT * FROM contacts WHERE fullname LIKE j% ORDER BY fullname LIMIT 10; But this is slow: SELECT * FROM contacts WHERE fullname LIKE j% ORDER BY

myodbc version 3.21.X

2006-04-20 Thread Reinhart Viane
Hey list, I'm am currently looking for myODBC 3.21.X but can't seem to find a suited downloadsite. Does anyone know a link to this version? Thanks in advance, Reinhart Viane

Re: Optimizing SQL statement

2006-04-20 Thread Joerg Bruehe
Hi all! (Sorry for the late reply.) Puiu Hrenciuc wrote (re-ordered): Barry [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Puiu Hrenciuc wrote: Hi, I have a table ( MyISAM, MySQL 5.0.20, FreeBSD ) containing network traffic data : record_time datetime - time when recording

Query Cache configuration

2006-04-20 Thread Gabriel Mahiques
Hi friends, I need your help. I want to configure the Query Cache, but it dosn't work. I have installed MySQL 5.0.19 in Mandrake Linux. The server has 2GB memory ram, 150 gb hard disk, exclusive for dbms. I configure my system how say the home page. I follow step by step the instructions.

Working out Square Footage with Feet and Inches

2006-04-20 Thread Shaun
Hi, I have measurements of rooms stored in a table for each house in feet and inches, does anyone know how can I work out the square footage? Thanks for your advice -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: Working out Square Footage with Feet and Inches

2006-04-20 Thread Jay Blanchard
[snip] I have measurements of rooms stored in a table for each house in feet and inches, does anyone know how can I work out the square footage? [/snip] Convert to inches, multiply length * width, divide by 144 (one square foot) -- MySQL General Mailing List For list archives:

RE: Working out Square Footage with Feet and Inches

2006-04-20 Thread David T. Ashley
There is a technique called unit cancellation that may serve you well. The technique is essentially to treat each unit as an orthogonal vector (orthogonal to all other units), so one unit can't be mixed with any other unit. The only way to convert is to multiply by various forms of 1. 1 is a

Re: where group and inner join

2006-04-20 Thread Peter Brawley
Peter, Best groupmember, I am doing this query that works fine. SELECT tps.tour_player_id, sum(if(tsh.hole_number=9, tps.strokes, '0')) AS 'front_9', sum(if(tsh.hole_number=10, tps.strokes, '0')) AS 'back_9', sum(tps.strokes) AS 'score' FROM tour_player_score tps INNER JOIN

RE: Working out Square Footage with Feet and Inches

2006-04-20 Thread Tim Lucia
I read this as a SQL syntax question, not a math word problem. As in SELECT ..., (some expression equaling sq ft) AS sqft... -Original Message- From: David T. Ashley [mailto:[EMAIL PROTECTED] Sent: Thursday, April 20, 2006 11:15 AM To: Jay Blanchard; Shaun; mysql@lists.mysql.com

RE: Working out Square Footage with Feet and Inches

2006-04-20 Thread Jay Blanchard
[snip] I read this as a SQL syntax question, not a math word problem. As in SELECT ..., (some expression equaling sq ft) AS sqft... [/snip] Cool, then do it! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: Working out Square Footage with Feet and Inches

2006-04-20 Thread RedRed!com IT Department
Jay Blanchard wrote: [snip] I read this as a SQL syntax question, not a math word problem. As in SELECT ..., (some expression equaling sq ft) AS sqft... [/snip] Cool, then do it! It would all depend on how he has his feet and inches saved in the table, and of course, the field names. If

MySQL 5 - Slow Login from remote

2006-04-20 Thread Kai Schmidt
Hi @all i have a Problem with Login into a MySQL 5 Server. When i try to login from a remote Machine into the Server, it needs up to 30 seconds. When i login from the same machine all is at it should be. After login the Server is responding normal to querys. My Environment: SuSE 10.0 MySQL

describe table : comment (some progress done, but...)

2006-04-20 Thread Gilles MISSONNIER
hello, I run MySQL 4.1.11 [ available for Linux Debian stable ]. and now, ok, the following command display 9 columns : mysql SHOW FULL COLUMNS FROM a_table; Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment BUT now I would just display 2 columns : Field |

RE: How to Verify Replication Status?

2006-04-20 Thread Robinson, Eric
James, thanks for the link. It looks promising. Since you have never used it, you probably won't know the answer to this question, but should I expect the checksums on the master and slave databases to be the same if they are in sync? -Original Message- From: James Harvard

RE: How to Verify Replication Status?

2006-04-20 Thread Robinson, Eric
Eric, that is very helpful. Thanks. Assuming the master and slave are in sync, is there a reason the checksums would not match? I would rather not dump the database and run an external checksum unless I have to. -- Eric Robinson Director of Information Technology Physician Select Management,

Re: MySQL 5 - Slow Login from remote

2006-04-20 Thread Dan Buettner
Kai, could this be a DNS issue? MySQL will normally try to look up which host you are coming from, if it is not localhost. If you have an incorrect DNS entry on the server, or a malfunctioning DNS server, this could be the problem. You can try adding skip-name-resolve under the [mysqld]

Re: [SPAM] Re: describe table : improvement

2006-04-20 Thread mysql
Thankyou Gabriel. So how does one set a column comment then? Regards Keith In theory, theory and practice are the same; in practice they are not. On Thu, 20 Apr 2006, Gabriel PREDA wrote: To: [EMAIL PROTECTED] [EMAIL PROTECTED] From: Gabriel PREDA [EMAIL PROTECTED] Subject: [SPAM] Re:

Re: MySQL 5 - Slow Login from remote

2006-04-20 Thread Prasanna Raj
Check where u resolve . that could help you I guess this DNS problem ,correct me if iam wrong . --Praj On Thu, 20 Apr 2006 18:43:39 +0200 Kai Schmidt [EMAIL PROTECTED] wrote: Hi @all i have a Problem with Login into a MySQL 5 Server. When i try to login from a remote Machine into the

How to initiate a prog. via mysql

2006-04-20 Thread abhishek jain
Dear Friends, I need to start a prog. as soon as a particular field in the mySQL 4.x is changed. ie. when in Flag table if_flag is set to '1' i need to start a script. The script will be in PHP. Pl. tell me how to do so on mySQL 4.x. I shall be very grateful. -- Regards, Abhishek Jain

WHERE doesn't work

2006-04-20 Thread Tom Lobato
Hi! 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'

RE: How to initiate a prog. via mysql

2006-04-20 Thread Jay Blanchard
[snip] I need to start a prog. as soon as a particular field in the mySQL 4.x is changed. ie. when in Flag table if_flag is set to '1' i need to start a script. The script will be in PHP. Pl. tell me how to do so on mySQL 4.x. [/snip] Triggers are not available in 4.x, you will need 5.x --

RE: WHERE doesn't work

2006-04-20 Thread Jay Blanchard
[snip] 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'

RE: getting unique results

2006-04-20 Thread Steve Giller
SELECT DISTINCT 'Service type' FROM 'service_providers' -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 April 2006 12:45 To: mysql@lists.mysql.com Subject: getting unique results SELECT `Service type` FROM `service_providers` How do I get only unique

MySQL Optimization error ?

2006-04-20 Thread Dyego Souza Dantas Leal
I have a good question, the MySQL Optimizer is broker ? see the querys: mysql explain select * from an where an_id in (100,200); ++-+---+---+---+---+-+--+--+-+ | id | select_type | table | type | possible_keys | key |

Re: How to initiate a prog. via mysql

2006-04-20 Thread Dan Nelson
In the last episode (Apr 20), Jay Blanchard said: [snip] I need to start a prog. as soon as a particular field in the mySQL 4.x is changed. ie. when in Flag table if_flag is set to '1' i need to start a script. The script will be in PHP. Pl. tell me how to do so on mySQL 4.x. [/snip]

Re: WHERE doesn't work

2006-04-20 Thread Tom Lobato
From: Jay Blanchard [EMAIL PROTECTED] More of a PHP question. Echo the UPDATE statement to the browser so that you can see what it looks like. It is what I did. As I explain in the mail, I executed the command extracted from the browser. The command is: UPDATE clientes SET tipo='r',

RE: WHERE doesn't work

2006-04-20 Thread George Law
After you give the query, try : echo mysql_error().P.mysql_info(); This way, you should be able to see exactly what error is coming back from PHP/MySQL -Original Message- From: Tom Lobato [mailto:[EMAIL PROTECTED] Sent: Thursday, April 20, 2006 1:55 PM To: Jay Blanchard;

Re: How to Verify Replication Status?

2006-04-20 Thread Eric Braswell
You'll need to checksum them at the same point in time, naturally -- which you can do by stopping replication on the slave, then performing the command on the master, then slave, and compare. In other words, if you are doing this on a live system, you have to make sure there are no writes in

simpe select count question

2006-04-20 Thread Andras Kende
Hello, I would like merge this 3 query into a single one... SELECT COUNT(*) AS count FROM orders WHERE order_status = 'pending', SELECT COUNT(*) AS count FROM orders WHERE order_status = 'processing', SELECT COUNT(*) AS count FROM orders WHERE order_status = 'shipped', I could do : SELECT

Re: MySQL 5 - Slow Login from remote

2006-04-20 Thread Kai Schmidt
Hi Dan, thank you. That seems to be the Problem solved. Will test it tomorrow in the Office again. But over VPN the login was more faster then without the skip-name-resolve value. Damn, that was so easy, that should i found out by myself ;-) Kai Am Donnerstag, 20. April 2006 19:13 schrieb

Re: How to initiate a prog. via mysql

2006-04-20 Thread Daniel da Veiga
On 4/20/06, Dan Nelson [EMAIL PROTECTED] wrote: In the last episode (Apr 20), Jay Blanchard said: [snip] I need to start a prog. as soon as a particular field in the mySQL 4.x is changed. ie. when in Flag table if_flag is set to '1' i need to start a script. The script will be in

Form value editing

2006-04-20 Thread Brian E Boothe
can someone please just send me or post a example of editing feilds of a mysql database within an html form and then updating the values thanks alot here is a small database u can use i can expand on your example as needed

RE: Form value editing

2006-04-20 Thread Jay Blanchard
[snip] can someone please just send me or post a example of editing feilds of a mysql database within an html form and then updating the values thanks alot here is a small database u can use i can expand on your example as needed [/snip] PHP question; When you click on the form submission

RE: How to Verify Replication Status?

2006-04-20 Thread Robinson, Eric
All excellent information. I have much to ponder. -Original Message- From: Eric Braswell [mailto:[EMAIL PROTECTED] Sent: Thursday, April 20, 2006 11:20 AM To: Robinson, Eric Cc: mysql@lists.mysql.com Subject: Re: How to Verify Replication Status? You'll need to checksum them at the same

Re: simpe select count question

2006-04-20 Thread Dan Buettner
Andras - If you create an additional table which contains all possible values for the order_status field, you can do this. Something like this: create table orderstatus ( statusname varchar(25) ); insert into orderstatus (statusname) values ('pending'), ('processing'), ('shipped'); Next

Re: MySQL Optimization error ?

2006-04-20 Thread David Griffiths
This isn't a bug, it's a missing feature. The parent query won't use indexes, just the subquery. There's been a lot of complaints about how it renders sub queries less than useful. I seem to remember that it might be fixed in 5.1, but I'm not a reliable source of info on this. David

Re: Working out Square Footage with Feet and Inches

2006-04-20 Thread Shaun
RedRed!com IT Department [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jay Blanchard wrote: [snip] I read this as a SQL syntax question, not a math word problem. As in SELECT ..., (some expression equaling sq ft) AS sqft... [/snip] Cool, then do it! It would all depend

Re: newbie optimization question

2006-04-20 Thread Adam Wolff
Thanks for the replies. The database is basically read-only at the moment, so OPTIMIZE TABLE didn't do anything. When I force the key to be fullname for the second problem, it runs even worse. It's not practical to create an additional email,fullname index because in my app I actually have 3!

Real Solution to ReplyTo problem

2006-04-20 Thread 2wsxdr5
As many have pointed out, the arguments on both sides of the mailing list ReplyTo behavior have serious flaws. There is a good reason for that. Both arguments are week and use a lot of spin, in a futile attempt to make their solution appear to be the ideal one. In reality, both solutions are

finding a record within a sort order

2006-04-20 Thread Adam Wolff
I have a table with a large number of rows. I have the primary key for a record within the table. The record I'm looking for looks like this: +++---+ | id | fullname | email |

Re: Form value editing

2006-04-20 Thread Peter Brawley
Brian E Boothe wrote: can someone please just send me or post a example of editing feilds of a mysql database within an html form and then updating the values thanks alot Google for php,mysql,examples. PB -- No virus found in this outgoing message. Checked by AVG Free Edition. Version:

Re: ~Master Slave setup on the same machine~

2006-04-20 Thread Atle Veka
Yes, that is certainly possible and would be just the same as configuring replication between different machines. Atle - Flying Crocodile Inc, Unix Systems Administrator On Thu, 20 Apr 2006, Mohammed Abdul Azeem wrote: Hi, Is it possible to configure a master and slave server on the same

RE: Form value editing

2006-04-20 Thread Pat Adams
On Thu, 2006-04-20 at 19:15 -0400, fbsd wrote: can someone please just send me or post a example of editing feilds of a mysql database within an html form and then updating the values thanks alot These should tell you everything you need to know.

Re: Optimizing SQL statement

2006-04-20 Thread Puiu Hrenciuc
First of all thanks all for your answers. Second I'll explain what I manage to do in regard with this issue, maybe someone else may need it in the future. So, first I have started by changing the way I have stored the `ip` field from varchar(15) to int unsigned and populated this field with the 4

Re: newbie optimization question

2006-04-20 Thread Adam Wolff
Hey! I figured out this one myself: On Apr 19, Adam Wolff wrote: * Question 2: Why does introducing an extra WHERE clause make things slower? If I do this: SELECT * FROM contacts WHERE fullname LIKE j% AND user_id=1 ORDER BY fullname LIMIT 10; It's because the index needs to be on

Re: Run Apache/PHP/MySQL from CD?

2006-04-20 Thread John Hicks
Jay Paulson wrote: I have no idea if this is possible or not but is there a way to run Apache, PHP, and MySQL from a CD? I'd like it to be possible to run it on Windows, Mac OSX and *nix. If it is possible could someone point me in the right direction? Thanks! XAMPP is a distribution of

(Errcode: 13) after moving data directory

2006-04-20 Thread boll
Hi- Using MySQL 4.1.11 on Fedora 4. I moved my data directory to a FAT partition in order to share it with Windows dual-boot. Now when I try to start mysqld normally, it fails with these messages in the log: 060420 18:16:03 mysqld started 060420 18:16:03 [Warning] Can't create test file

Re: compress/uncompress using java prepared statements

2006-04-20 Thread Ramesh V
Hi, I am a bit confused by the below, hope I can get some clarification. In the database (mysql), I have image data stored in a blob. I can perform operations like: COMPRESS and UNCOMPRESS on it and the data is fine. Let's say I COMPRESS (ed) the data and then retrieve it use a SELECT

RE: [PHP] Re: Run Apache/PHP/MySQL from CD?

2006-04-20 Thread Nicolas Verhaeghe
I guess the CD could be mounted on MacOS and Unix to be treated as a true drive but I am confident it would not work on Windows, knowing how every application has to embed itself with the registry and the system files, usually register DLLs and what not. But whatever happens, the CD should never

RE: finding a record within a sort order

2006-04-20 Thread Nicolas Verhaeghe
MySQL does seem to have a row number function and the purpose of this is because it increases the processing time, as you have seen with your workaround. I would instead create a temp table with an autoincremented ID, insert the content of your record set into it and use this autoincremented ID

RE: Working out Square Footage with Feet and Inches

2006-04-20 Thread Nicolas Verhaeghe
RedRed!com IT Department [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jay Blanchard wrote: [snip] I read this as a SQL syntax question, not a math word problem. As in SELECT ..., (some expression equaling sq ft) AS sqft... [/snip] Cool, then do it! It would all depend on

RE: Form value editing

2006-04-20 Thread Nicolas Verhaeghe
can someone please just send me or post a example of editing feilds of a mysql database within an html form and then updating the values thanks alot here is a small database u can use i can expand on your example as needed