data directory for mysql

2005-06-04 Thread Digvijoy Chatterjee
Hi all, I have been using /var/mysql/data as my data directory till now , suddenly i realise its all filled up with some 20M left which will finish in a day or two , repartioning my disks is not an option , what do i do to restart mysql with a new data directory say /usr/local/mysql/data/: changin

Re: If statment in query

2005-06-04 Thread Simon Garner
Sebastian wrote: I have two fields: topic | title topic does not always have data in it, so i want to select `title` when `topic` is null.. i thought i could do this (does not work): IF(title IS NULL, topic, title) AS heading Thanks. Try SELECT IFNULL(title, topic) AS heading -Simon -

If statment in query

2005-06-04 Thread Sebastian
I have two fields: topic | title topic does not always have data in it, so i want to select `title` when `topic` is null.. i thought i could do this (does not work): IF(title IS NULL, topic, title) AS heading Thanks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/my

Re: mysql UNION

2005-06-04 Thread Sebastian
Hi, your second method is probably a little too confusing (advanced) for me to understand. I used your first method which works fine.. thanks for the crazy stuff, somtimes you need two crazy people to come up with a solution ;) [EMAIL PROTECTED] wrote: Hi Sebastian; There is always crazy thin

Re: mysql UNION

2005-06-04 Thread mfatene
Hi Sebastian; There is always crazy things somewhere. I'll give you two methods for that : mysql> select id,'news' as selected, type from news -> union select id,'faq' as selected, type from faq -> union select id,'forum' as selected, type from forum; +--+--+---+ | id | s

Re: mysql UNION

2005-06-04 Thread Sebastian
Michael Stassen wrote: Sebastian wrote: i have a query with 3 union selects: SELECT id, 'news' AS type, FROM news UNION SELECT id, 'faq' AS type, FROM faq UNION SELECT id, 'forum' AS type, FROM forum which works just fine and selects everything from all

Re: mysql UNION

2005-06-04 Thread leegold
Couldn't you just test "page.php?cat=faq" with an if-then-else? Depending on what is the GET variable you then can change the SQL, easy w/PHP. On Sat, 04 Jun 2005 14:15:40 -0400, "Sebastian" <[EMAIL PROTECTED]> said: > i have a query with 3 union selects: > > SELECT id, 'news' AS type,

Re: mysql UNION

2005-06-04 Thread Michael Stassen
Sebastian wrote: i have a query with 3 union selects: SELECT id, 'news' AS type, FROM news UNION SELECT id, 'faq' AS type, FROM faq UNION SELECT id, 'forum' AS type, FROM forum which works just fine and selects everything from all 3 tables.. but say i wa

mysql UNION

2005-06-04 Thread Sebastian
i have a query with 3 union selects: SELECT id, 'news' AS type, FROM news UNION SELECT id, 'faq' AS type, FROM faq UNION SELECT id, 'forum' AS type, FROM forum which works just fine and selects everything from all 3 tables.. but say i want to make a cond

Re: Design of a Client-side MySQL Java Load Balancer

2005-06-04 Thread mfatene
image ? you're modifying row n, node x wants to modify it, you need a rollback segment for that ! which value node x will read. i'm considering every DML is a transaction in an RDBMS, so when you say that you don't use transactions, you miss something. about load balancing, how do you track long

Re: compile error

2005-06-04 Thread Gleb Paharenko
Hello. Usually compiling manually is not a good idea, if there are official binary for your platform available. Ensure that you have the fresh bison. Mir Islam <[EMAIL PROTECTED]> wrote: > I am stumped with this compile problem with 4.0.24 src. Not sure what > is causing it. Can anyo

Re: recovery question

2005-06-04 Thread Per Jessen
Gleb Paharenko wrote: > Hello. > > REPAIR TABLE ... USE_FRM helps in difficult cases. See: > http://dev.mysql.com/doc/mysql/en/repair-table.html > Thanks Gleb. I'd forgotten about that option. To others who try the same thing - make sure you have enough space in your TMPDIR or set TMPDIR/

Re: How to find random records in a subset?

2005-06-04 Thread mfatene
select LIMIT 50; mathias Selon Brian Dunning <[EMAIL PROTECTED]>: > I am using a routine to find 50 random records in a large MySQL > database (about a million records) where I generate a list of 50 > random unique ID's, and then use MySQL's "in" command to find them. I > can't use "order b