Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#mysql

18 October 2007


Total 25 pages. You are browsing page 2/25.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

00:36 <****> :P
00:38 <****> Can someone recommend a nice book on MySQL HA ?
00:38 <****> (or in fact HA in general)
00:38 <****> hmmm, is there a way to get the 2nd final_price in this query to work? (I understand why it doesn't work, but not quite sure of the right way to sort this out....
00:38 <****> SELECT IF(tax_exempt = 'N', total/1.175, total) AS final_price, (total - final_price) AS tax
00:39 <****> Mrdini: replace the total in (total - fina...) with the equation for total (the IF)
00:39 <****> http://en.wikipedia.org/wiki/Fast_Fourier_transform
00:39 <****> whoops. wrong channel.
00:39 <****> chadmaynar, yeah, that works but ew, readability :P
00:40 <****> Mrdini: yea.
00:40 <****> would prefer to be able to re-use "final_price_ if somehow possible
00:40 <****> Mrdini: you can use it just not until it is computed.
00:43 <****> chadmaynar, never mind, not worth the hassle of working out a "Cleaner" solution :P *does the unheard of thing & comments the code* :P
00:44 <****> I need to go to the grocery store or i'm going to starve.
00:49 <****> what is the deault value for datetime
00:49 <****> it wont let me save my table because my datetime table doesnt have a defgault value
00:49 <****> how does outfile work? can it export a table to a .sql file?
00:51 <****> guys
00:52 <****> does anyone know how to export a table in mysqlcc?
00:52 <****> PaulB: what exactly is your definition on crate table?
00:52 <****> how y copy the value of a column in another column?
00:52 <****> how i can copy the value of a column in another column?
00:54 <****> update x t set column1 = column2;
01:24 <****> if I have a column named myColen-US, how can i select from it in my SQL. I keep getting erros when i have the symbol - in query.
01:26 <****> quotes
01:26 <****> quotes?
01:26 <****> in particular backwards quotes
01:26 <****> '' ?
01:26 <****> ahh
01:27 <****> select `myColen-US` from foo where ....
01:28 <****> i have a table named `database.entries` will that work?
01:28 <****> sorry could not resist
01:30 <****> mikegriffin, should work. have not tried such perversion on mysql, but in theory it should work. (unless you meant that the quotes were part of the name)
01:33 <****> thx
01:48 <****> Whoa
01:48 <****> MySQL 5.1.16..
01:48 <****> SELECT SUM(INDEX_LENGTH) from information_schema.TABLES where ENGINE='MyISAM';
01:48 <****> hangs
01:58 <****> clergyman: did it finish?
02:03 <****> hello
02:09 <****> I have a table A with a column ID. I need to insert in a table 'B' for every value from B.ID_AUTOR = A.ID AND B.FORMAT = "HTML" . How Can I write that query?
02:13 <****> I try to explain my problem: for each A.ID I need Insert B.ID_AUT = A.ID AND B.FORMAT = 'constant'
02:14 <****> !m tin_nqn insert
02:14 <****> tin_nqn: (INSERT Syntax) : http://dev.mysql.com/doc/mysql/en/insert.html
02:14 <****> !m tin_nqn insert select
02:14 <****> tin_nqn: (INSERT ... SELECT Syntax) : http://dev.mysql.com/doc/mysql/en/insert-select.html
02:15 <****> tin_nqn: 2nd one
02:21 <****> jbalint: Yes, but after an unreasonable amount of time
02:21 <****> Could reproduce twice, it's back to normal now.. I'm too tired to even guess what happened to be honest :)
02:22 <****> Clearly you need an index!
02:24 <****> kimseong: I've tried this: INSERT INTO `ceincin_auteurs_elargis` (`id_auteur`,`spip_listes_format`) VALUES ((SELECT `id_auteur` FROM `ceicin_auteurs`), 'html')
02:26 <****> tin_nqn: does it work? there is another method insert - select , yours is subquery, the select expect to return 1 row 1 col in this case, which does not look like it
02:26 <****> i guess it does not work
02:26 <****> Subquery returns more than 1 row
02:26 <****> the insert - select will work in such cases
02:26 <****> no subquery and no values
02:27 <****> !m tin_nqn insert select
02:27 <****> tin_nqn: (INSERT ... SELECT Syntax) : http://dev.mysql.com/doc/mysql/en/insert-select.html
02:27 <****> this one will work
02:28 <****> anyone help with a perl module problem I am having?
02:28 <****> need the MySQL client libraries for DBD perl module
02:30 <****> kimseong: thanks a lot
02:30 <****> for summary tables, whats the best strategy for keeping an accurate average for several fields?
02:30 <****> It's worked
02:30 <****> ie, a table of averages for user ratings
02:31 <****> Simetrical: Good one ;)
02:32 <****> _dinosaurus, make sure your application updates them every time it adds/removes/changes a row in the relevant table.
02:32 <****> Simetrical: how should i update the averages when a new rating is submitted? should i set triggers to do an aggregate average of all the ratings?
02:32 <****> _dinosaurus, there's no way that I know of to tell MySQL to keep a count of stuff like averages, although that would be bloody nice.
02:32 <****> _dinosaurus, no, just use mathematics.
02:33 <****> _dinosaurus: a trigger could do it for you, sure
02:33 <****> But they don't have to do an average every time.
02:33 <****> Simetrical: (aggregate rating + new rating value / # of ratings) doesnt yield the right number, though
02:33 <****> Has anyone experienced a problem where a thread just ends up sitting there, doing absolutely nothing? We get those once every night, different queries, different tables, but always INSERT queries
02:33 <****> No CPU usage, disk I/O, memory allocations, and the thread never exits
02:34 <****> if I kill it, it changes the state to "killed", but it doesn't actually go a way.. kill -9 and restart is the only/fastest way to resurrect it
02:34 <****> Something like: UPDATE summary SET average = (average*number + newrating)/(number+1), number = number+1;
02:34 <****> (I'm assuming that SET for multiple variables is guaranteed to be executed left to right.)
02:35 <****> clergyman: is it around the time there's a backup going? a query may be waiting for a lock and even if you kill it, it won't go away until the lock is released and it can exit the lock queue
02:35 <****> litheum: No other queries or processes running
02:35 <****> _dinosaurus, you need to multiply the aggregate rating by the old number of ratings to give it the proper weight, then divide the new sum by the new number of ratings.
02:35 <****> Backups are running on an off site slave machine
02:36 <****> Nothing else but that query (apart from the master/slave threads) in "show full processlist"
02:36 <****> the fact that it's always at night time I think is more related to the fact that there are crontabs which are quite insert heavy running
02:39 <****> clergyman: do a SHOW PROCESSLIST to confirm and determine what is the state of the stuck query
02:40 <****> ops, you already did
02:40 <****> if no other query in processlist, how does the insert happens? through the replication?
02:40 <****> then that is other query
02:41 <****> small php problem... for some reason, i get errors on the following line, but i dont see the syntax error. thanks... $stmt = "select distinct age from Art where gender = " . "'" . $_GET['gender'] . "'";
02:41 <****> kimseong: Sometimes through replication, but sometimes not
02:41 <****> clergyman: if there are insert, you should see it in processlist
02:41 <****> hey everyone, I am working on my databasing homework and I am having trouble with joins and extrating data out of multiple tables, would anyone be as so kind as to help me one on one so I can understand this stuff?
02:42 <****> ashna, first of all, that's a prime example of SQL injection. Anyone viewing the page could retrieve any info from your database they want by putting an appropriate value in the URL parameter "gender".
02:42 <****> kimseong: Yes, I can see them there
02:42 <****> ashna, you should *always* do something like mysql_escape_string( $_GET['gender'] ) for user-supplied data.
02:42 <****> clergyman: so there are other query and insert could have lock the table, and the other query is waiting for lock, check the state column of processlist
02:43 <****> ashna, second of all, you should be sure that $_GET['gender'] is actually set before you ever run the query. Users may request a URL with the "gender" parameter unset.
02:43 <****> ashna, if that still doesn't solve it, please post the exact error message.
02:44 <****> Riot642, best to ask the questions and see if anyone answers.
02:45 <****> kimseong: Nops, nothing else running but the slave thread


Total 25 pages. You are browsing page 2/25.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo