Re: what this error was

2006-09-04 Thread Rhino
- Original Message - From: "VenuGopal Papasani" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 05, 2006 12:28 AM Subject: what this error was Hi, I was trying to import some of the data into the 'datavalue' table of my database i was getting th following error Error Code : 1452 C

what this error was

2006-09-04 Thread VenuGopal Papasani
Hi, I was trying to import some of the data into the 'datavalue' table of my database i was getting th following error Error Code : 1452 Cannot add or update a child row: a foreign key constraint fails (`gtest1/datavalue`, CONSTRAINT `FKEB92DC077A7A2FFA` FOREIGN KEY (`dataElement`) REFERENCES `da

Re: IN & ANY subqueries

2006-09-04 Thread Ben Lachman
So possibly a better solution would be to create a temporary table and then do a subquery on that table? ->Ben On Sep 4, 2006, at 7:37 AM, Visolve DB Team wrote: Hi The ANY keyword, which must follow a comparison operator, means "return TRUE if the comparison is TRUE for ANY of the values

Re: Combo of 2 fields needs to be unique

2006-09-04 Thread Vincent . Badier
Hello Brian, IMHO if you put this combinaison as a uniq key, any insert with this combinaison already existing will fail Vincent Brian Dunning <[EMAIL PROTECTED]> 04/09/2006 16:49 To: mysql@lists.mysql.com cc: Subject:Combo of 2 fields needs to be u

Combo of 2 fields needs to be unique

2006-09-04 Thread Brian Dunning
I'm tracking site visitors with a database - one field is the IP address, the other is the page they've visited. I don't want any duplicates of this combination. Is there a MySQL statement similar to INSERT IGNORE but will ignore only if the combination is duplicated? -- MySQL General Maili

SQL subqueries and JOIN conditions

2006-09-04 Thread Vincent . Badier
Hello all, I need to perform an SQL statement over 5 different tables, with complex request. To do so, i'm using subqueries. SELECT ... FROM (SELECT .WHERE) as T1 LEFT JOIN (SELECT .WHERE) as T2 WHERE . The problem is that only JOIN seems working with subqueries (LEFT JOIN

Re: How to find the top most member in a hierarchy of subcategories

2006-09-04 Thread Renato Golin
Peter Lauri wrote: Yes, and this shows that you can not do it will MySQL purely :) But a scripting language like php can do it for you with a recursive function as the best option. IMHO, the best option would do it with a procedure as you don't get out of the database and don't have any overhe

RE: How to find the top most member in a hierarchy of subcategories

2006-09-04 Thread Peter Lauri
Yes, and this shows that you can not do it will MySQL purely :) But a scripting language like php can do it for you with a recursive function as the best option. /Peter -Original Message- From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED] Sent: Monday, September 04, 2006 7:55 PM

RE: How to find the top most member in a hierarchy of subcategories

2006-09-04 Thread Peter Lauri
MySQL is not recursive. This might help you: http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html /Peter www.lauri.se - personal web site www.dwsasia.com - corporate web site -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of abhishek jain S

Re: How to find the top most member in a hierarchy of subcategories

2006-09-04 Thread Jo�o C�ndido de Souza Neto
I´m not quite sure if it could help you, because it´s whole in portuguese, but i´ll send you. My table is called categoria and has the follow structure: CREATE TABLE `categoria` ( `id` int(20) NOT NULL auto_increment, `cat_id` int(20) NOT NULL default '0', `nome` varchar(50) NOT

Re: CentOS 4.3 - MySQL - NIS user issue

2006-09-04 Thread Wai-Sun Chia
On 8/31/06, Tom Brown <[EMAIL PROTECTED]> wrote: Hi I have what i think is a strange issue - now when a NIS user tries to use the db [EMAIL PROTECTED] su - bugzilla [EMAIL PROTECTED] mysql -u bugs -p bugs ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mys

Re: IN & ANY subqueries

2006-09-04 Thread Visolve DB Team
Hi The ANY keyword, which must follow a comparison operator, means "return TRUE if the comparison is TRUE for ANY of the values in the column that the subquery returns In has 2 forms: 1. IN (subquery). [The word IN is an alias for = ANY (subquery)]. 2. IN (list of values seperated by comma)

changing datadir

2006-09-04 Thread Helen M Hudson
Has anyone good advice on changing the datadir on a Linux box. I have version 5.0.16 and my databases amount to about 5Gb. I'd like to move them over to one of the other logical disks on the Linux file system. Without any advice, I'd dump, reconfigure the datadir line in the cfg, and restore...

Re: Understanding Query-Cache math...

2006-09-04 Thread Visolve DB Team
Hi The query cache uses variable-length blocks and the Qcache_total_blocks and Qcache_free_blocks may indicate query cache memory fragmentation. After FLUSH QUERY CACHE, only a single free block remains. So the variables query_cache_min_res_unit, query_cache_limit, query_prealloc_size, query_al

How to find the top most member in a hierarchy of subcategories

2006-09-04 Thread abhishek jain
Hi, I have a table structure like : ID , NAME, PARENT_ID 1 , Top , 0 2 , Level 1 , 1 3 , Level 2 ,2 4 , Another Top , 0 and so on. I wanted to know the topmost cat. if i have the lowest category id ie. 3 in this case. I wanted to get like 3->2->1 Pl. help me , cn i do this in one query, also i d