Re: MySql doubt.

2006-11-27 Thread ViSolve DB Team
Hi Renish, In case if you dont have the Item field in the Table B. Try the following query select item from a where item not in ( select substring(price,1,instr(price,'-')-1) from b ); This will list out the the items which doesnt have price. mysql select * from a; ++ | item |

Re: Having Problem With Load Files and AutoNumber id fields

2006-11-27 Thread Visolve DB Team
Hi, My opinion is alter your table so that auto increment column should be the last column. Try importing values for n-1 columns, where the nth column will get increment with auto_increment get escaped from NULL values. For instance: mysqlcreate table x (item varchar(10),price int,id int not

Re: MySql doubt.

2006-11-27 Thread Renish
Great Thanks,, - Original Message - From: ViSolve DB Team [EMAIL PROTECTED] To: Renish [EMAIL PROTECTED]; mysql@lists.mysql.com Sent: Monday, November 27, 2006 4:57 PM Subject: Re: MySql doubt. Hi Renish, In case if you dont have the Item field in the Table B. Try the following

Re: Having Problem With Load Files and AutoNumber id fields

2006-11-27 Thread Remo Tex
John Kopanas wrote: Argh... I am autogenerating a load file after parsing and massaging a text file I get from an AS/400 system. My first field is an id that is on auto_number so I put a tab at the begging of the line for each one of my records... it throws a warning for each line... if

Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-27 Thread Dominik Klein
My innodb_buffer_pool_size is: innodb_buffer_pool_size | 8388608 That looks like 8MB... that sounds small if I have a DB with over 1M rows to process. No? Yes, that's extremely small. I'd go for at least 256M, and maybe 512M if your machine will primarily be doing mysql duties.

Re: MySql doubt.

2006-11-27 Thread Rolando Edwards
drop table if exists A; drop table if exists B; create table A ( item varchar(30), primary key (item) ); create table B ( item varchar(30), price decimal(7,2) not null default 0.0, primary key (item), unique key (item) ); insert into A values ('Book'),('Pencil'),('Table'); insert into B values

MySQL-4.1.22 has been released

2006-11-27 Thread Mads Martin Joergensen
Dear MySQL Users, MySQL 4.1.22, a new version of the popular Open Source Database Management System, has been released. The MySQL server 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. We

create function in mysql 5.0.26-3

2006-11-27 Thread Anakreon Mejdi
I am trying to create a stored function. From the docs I saw the code for this function: CREATE FUNCTION hello (s CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN CONCAT('Hello, ',s,'!'); The version from the docs did not contain the DETERMINISTIC keyword. I added because it would not compile.

Re: create function in mysql 5.0.26-3

2006-11-27 Thread Mike Kruckenberg
Anakreon Mejdi wrote: I am trying to create a stored function. From the docs I saw the code for this function: CREATE FUNCTION hello (s CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN CONCAT('Hello, ',s,'!'); The version from the docs did not contain the DETERMINISTIC keyword. I added

Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-27 Thread Duncan Hill
On Saturday 25 November 2006 17:54, John Kopanas wrote: The following query takes over 6 seconds: SELECT * FROM purchased_services WHERE (purchased_services.company_id = 535263) What does EXPLAIN say about that query? Have you done an optimize recently? -- Scanned by iCritical. -- MySQL

Calling Stored Procedures from PHP

2006-11-27 Thread Filipe Freitas
Hi, This is not a mysql thing but maybe you can help me. I want to call a stored procedure from PHP, so I tried it like normal querys: mysql_query(CALL mySP();); with no success. thx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Book Recommendation

2006-11-27 Thread Nicholas Vettese
I am looking for a book that will help me understand PHP/MySQL, and the way that they work together. My biggest problem is multi-valued selections, and INSERTING them into the database. A book with great examples like that would be a huge help. Also, any websites that could do the same would be

RE: Copy some datasets including the foreign key constraints

2006-11-27 Thread Jerry Schwartz
I am not an expert in this, but it looks as though you are trying to define foreign keys on your parent table. I thought you had to define the parent table without foreign keys, and then define a child table with foreign key constraints. I'm also not sure if you are trying to redefine the key

Re: Calling Stored Procedures from PHP

2006-11-27 Thread Rolando Edwards
Remove the Semicolon mysql_query(CALL mySP()); Give it a try !!! - Original Message - From: Filipe Freitas [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Monday, November 27, 2006 10:59:09 AM GMT-0500 US/Eastern Subject: Calling Stored Procedures from PHP Hi, This is not a mysql

Re: Calling Stored Procedures from PHP

2006-11-27 Thread Chris White
On Monday 27 November 2006 07:59, Filipe Freitas wrote: Hi, This is not a mysql thing but maybe you can help me. I want to call a stored procedure from PHP, so I tried it like normal querys: mysql_query(CALL mySP();); with no success. thx No success how? Generally with stored procedures

Re: Book Recommendation

2006-11-27 Thread Chris White
On Monday 27 November 2006 07:28, Nicholas Vettese wrote: I am looking for a book that will help me understand PHP/MySQL, and the way that they work together. My biggest problem is multi-valued selections, and INSERTING them into the database. A book with great examples like that would be a

MySQL Performance Degrades Significantly Over Time

2006-11-27 Thread Jason J. W. Williams
Hi, We're running MySQL 5.0.27 under Solaris 10 on both Opteron and UltraSparc T1 machines. The performance on both boxes starts out great when the process is fresh, however over the course of a week of heavy use the performance degrades to the point where its nearly unusable. The Opteron has

Re: MySQL Performance Degrades Significantly Over Time

2006-11-27 Thread Daniel da Veiga
On 11/27/06, Jason J. W. Williams [EMAIL PROTECTED] wrote: Hi, We're running MySQL 5.0.27 under Solaris 10 on both Opteron and UltraSparc T1 machines. The performance on both boxes starts out great when the process is fresh, however over the course of a week of heavy use the performance

Re: Calling Stored Procedures from PHP

2006-11-27 Thread Filipe Freitas
Chris White wrote: On Monday 27 November 2006 07:59, Filipe Freitas wrote: Hi, This is not a mysql thing but maybe you can help me. I want to call a stored procedure from PHP, so I tried it like normal querys: mysql_query(CALL mySP();); with no success. thx No success how?

Re: Calling Stored Procedures from PHP

2006-11-27 Thread Mike Kruckenberg
Filipe Freitas wrote: Hi, This is not a mysql thing but maybe you can help me. I want to call a stored procedure from PHP, so I tried it like normal querys: mysql_query(CALL mySP();); with no success. What is happening when you make the call? That might help get some more precise advice. My

RE: Having Problem With Load Files and AutoNumber id fields

2006-11-27 Thread Jerry Schwartz
Perhaps that empty field is being interpreted as a string? Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: John Kopanas [mailto:[EMAIL PROTECTED] Sent: Friday, November 24,

RE: Book Recommendation

2006-11-27 Thread Price, Randall
Here are a few websites you can check out: http://www.freewebmasterhelp.com/tutorials/phpmysql http://us2.php.net/mysql http://www.php-mysql-tutorial.com/ http://www.weberdev.com/ Hope these help. Randall Price Secure Enterprise Technology Initiatives Microsoft Implementation Group Virginia

RE: FIND_IN_SET question

2006-11-27 Thread Jerry Schwartz
Is this one of those places where a HAVING clause is needed? ... HAVING YESNO = 0 Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: Lars Schwarz [mailto:[EMAIL PROTECTED] Sent:

Re: MySQL Performance Degrades Significantly Over Time

2006-11-27 Thread Dan Buettner
Jason, in addition to Daniel's suggestions, I'll throw this out there: I had a somewhat similar problem with a database I used to own, where a handful of very hard-hit tables would become progressively slower over time, despite the fact that (due to daily archiving and purging) they were not

Re: RE: Having Problem With Load Files and AutoNumber id fields

2006-11-27 Thread John Kopanas
The empty field did not work but the 0 worked beautifully! Thanks everyone! :-) On 11/27/06, Jerry Schwartz [EMAIL PROTECTED] wrote: Perhaps that empty field is being interpreted as a string? Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032

Many-Many relation, matching all

2006-11-27 Thread James Northcott / Chief Systems
Hello, I'm having a conceptual issue with many-to-many relations. I have the following structure: Table A ID (int primary key) ... descriptive columns ... Table B ID (int primary key) ... descriptive columns ... Table AhasB AID (references A.ID) BID (references B.ID) So,

One big table or several smaller tables?

2006-11-27 Thread Daniel Smith
Assuming a decent spec server, would a simple search query on a big indexed table be quicker than searching the amount of data divided into separate tables? The kind of situation I have in mind is a database of events during a year, this table could top 1,000,000 enteries on the vague kind of

Re: One big table or several smaller tables?

2006-11-27 Thread Chris White
On Monday 27 November 2006 13:50, Daniel Smith wrote: Assuming a decent spec server, would a simple search query on a big indexed table be quicker than searching the amount of data divided into separate tables? I'd recommend a single large table with a DATE/DATETIME field which would be

Re: Replication error: Unable to get certificate

2006-11-27 Thread Alex Greg
Master_SSL_Allowed: Yes Master_SSL_CA_File: /root/.mysql/cacert.pem Master_SSL_CA_Path: /root/.mysql/ Master_SSL_Cert: /root/.mysql/client-cert.pem Master_SSL_Cipher: Master_SSL_Key: /root/.mysql/client-key.pem

A simple way to make table joins 2x faster

2006-11-27 Thread mos
I thought I'd pass this on for those of you that have slow table joins. I'm sure a few of you have already figured this out, but if not, here it is. I have some slow table joins, namely a 6 table join using a primary integer index field which takes 15 seconds to pull in 18k rows from each of

Simple doubt

2006-11-27 Thread Renish
Gurus, How do I go about to selecting an item which is repeated more than one in a field in a table. For example Item table Mango Orange Carrot Papaya Mango Mango -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Problems inserting chinese characters

2006-11-27 Thread Barbara Deaton
All, I have an application in which I am trying to insert some traditional Chinese characters. The insert statement probably won't cut and paste correctly but it is: insert into TKTS13 values (2,'ÄãºÃ', 'ÄãºÃ'); I have used this website http://people.w3.org/rishida/scripts/uniview/conversion

Re: Simple doubt

2006-11-27 Thread Peter Brawley
SELECT DISTINCT ... Renish wrote: Gurus, How do I go about to selecting an item which is repeated more than one in a field in a table. For example Item table Mango Orange Carrot Papaya Mango Mango -- No virus found in this outgoing message. Checked by AVG Free Edition. Version:

Re: Simple doubt

2006-11-27 Thread Renish
But if I do like this.. select distinct store, price from Item will both become distinct? How can I make only one distinct ie store distinct regards, - Original Message - From: Peter Brawley [EMAIL PROTECTED] To: Renish [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Tuesday,

Re: Simple doubt

2006-11-27 Thread Renish
Hello all, I think u guys have mistaken my question,.. The questiion is How will capture the entries which are entered more than once... Like For example Item table Mango Orange Carrot Papaya Mango Mango I want to capture only mango cos it is repeated more than once - Original

Re: Book Recommendation

2006-11-27 Thread David T. Ashley
On 11/27/06, Nicholas Vettese [EMAIL PROTECTED] wrote: I am looking for a book that will help me understand PHP/MySQL, and the way that they work together. My biggest problem is multi-valued selections, and INSERTING them into the database. A book with great examples like that would be a huge

Re: Simple doubt

2006-11-27 Thread Peter Brawley
But if I do like this.. select distinct store, price from Item will both become distinct? SELECT DISTINCT returns one result row per distinct _result_ row (which will be the same as 'per distinct table row' only if all table columns are selected). The questiion is How will capture the

Re: Simple doubt

2006-11-27 Thread Renish
Dupes - Original Message - From: Peter Brawley [EMAIL PROTECTED] To: Renish [EMAIL PROTECTED]; mysql@lists.mysql.com Sent: Tuesday, November 28, 2006 11:48 AM Subject: Re: Simple doubt But if I do like this.. select distinct store, price from Item will both become distinct? SELECT

Re: Simple doubt

2006-11-27 Thread ViSolve DB Team
Hi Renish, If you want to capture the entries which are entered more than once. Here's the answer for it. mysql select * from a; ++ | b | ++ | pen| | pencil | | rubber | | pen| | paper | | paper | ++ 6 rows in set (0.00 sec) mysql select b from a group

Re: Simple doubt

2006-11-27 Thread Renish
Smart. and simple .I should have thought for a while:-( - Original Message - From: ViSolve DB Team [EMAIL PROTECTED] To: Renish [EMAIL PROTECTED]; Hal Wigoda [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Tuesday, November 28, 2006 11:58 AM Subject: Re: Simple doubt Hi Renish, If

Re: Many-Many relation, matching all

2006-11-27 Thread Peter Brawley
I want to find all A's such that they have exactly B's 1 and 2 SELECT A.ID, group_concat(BID ORDER BY BID) as Bs FROM A INNER JOIN AhasB ON A.ID=AID GROUP BY A.ID HAVING Bs='1,2' Why the join? Doesn't your ahasb bridge table already incorporate the join logic? If your requirement is to retrieve

Re: Simple doubt

2006-11-27 Thread Peter Brawley
To find dupe rows in tbl on cols a,b,c,d,e: SELECT a,b,c,d,e FROM tbl GROUP BY a,b,c,d,e HAVING COUNT(*) 1; PB - Renish wrote: Dupes - Original Message - From: Peter Brawley [EMAIL PROTECTED] To: Renish [EMAIL PROTECTED]; mysql@lists.mysql.com Sent: Tuesday, November 28, 2006

deadlock with autocommit=1

2006-11-27 Thread Gu Lei
Hi everyone, I got deadlock information below by SHOW INNODB STATUS\G when I tested DBMAIL. LATEST DETECTED DEADLOCK 061128 9:50:11 *** (1) TRANSACTION: TRANSACTION 0 4067778, ACTIVE 0 sec, process no 17263, OS thread id 2968161200 starting index

Re: Simple doubt

2006-11-27 Thread Renish
How abt to return the distinct rows? - Original Message - From: Peter Brawley [EMAIL PROTECTED] To: Renish [EMAIL PROTECTED]; mysql@lists.mysql.com Sent: Tuesday, November 28, 2006 11:48 AM Subject: Re: Simple doubt But if I do like this.. select distinct store, price from Item will

Should I use an index in this case?

2006-11-27 Thread Andy Sy
I have a table that is roughly like the below: id - PK, autoincremented integer name - varchar visit- timestamp action - char(10) Now, 'action', while a char(10), is only ever intended to contain two possible values, purchase and preview. The table might end up containing tens

Sample program

2006-11-27 Thread Nishant Gupta
Hello all Sorry to disturb you, but am trying to start using MySql on Linux using C/C++. All the sample programs I found are merely compilable but crash while running. Can anyone post a simple program to insert a record in a table in a database? One more thing i needed to know that do we need to

Re: Should I use an index in this case?

2006-11-27 Thread Yonghua . Wu
Hi Andy, Two questions for you: 1) Why store so many repeatable data in the same table? I mean you needn't to store purchases/previews for all records. You can choose MySql SET datatype, or you can choose another table to store the action types and let the original table refers to it. So that you

Re: Problems inserting chinese characters

2006-11-27 Thread Yonghua . Wu
Hi Barbara, The hex value '3F' represents the question mark, which means your server CAN'T convert the characters correctly from your client. Regards, Barbara Deaton [EMAIL PROTECTED] wrote on 2006-11-28 11:16:09: All, I have an application in which I am trying to insert some