| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10
Comments:
<0> I guess I don't understand what I would join to. <1> on the months in which you're interested - i only know non-mysql shortcuts to that, but longhand: select 1 union select 2 union select 3 ... union select 12 <2> IdahoEv: You need to derive such a table of month values. <1> or put those in a table, if you prefer <2> IdahoEv: Then LEFT or RIGHT JOIN with it. <0> Ok <1> Xgc, that's what i just said... <0> Was hoping i could do it without actually creating a table just for the months <1> you can, if your database supports subselects <1> or has a function to generate a result set <0> hmmm, sounds like stuff to look up :-) <2> IdahoEv: A derived table is fine. But you probably will find it much easier to create a concrete table. <1> does mysql have an equilavlent to PL/SQL, by the way? <0> a concrete table would have to be updated. or i suppose i could just generate a table of the months until some time after the client is likely to die, but that doesn't feel like a clean programmers' solution. <2> IdahoEv: You plan on adding more months in a year? 12 is not enough for you? <0> The report must span multiple years.
<1> are your years' months homogeneous? <0> e.g. the client wants a convenient report to show how many sales were made in each month of each year from the beginning of the database until today <2> IdahoEv: You only need a table of months. You can create a separate table of years. There are some odd cases that could still be an issue. <1> cardinality shouldn't matter here, since it's a join... <1> i don't understand why the suggestions made are inappropiate :/ <0> oh hey, that just gave me an idea <2> IdahoEv: No kidding. <3> Hello Xgc <2> Evening hafizan. <3> so how i had to solve it <1> oh, you didn't actually understand the first-time around <1> ok :) <3> i had analyze the table <3> fine <1> i think i'd be very lost without the > and < operators for timestamp types <0> an obnoxious wordy query, but it would require no other tables nor updating, and would actually make the report simpler since the client wants one row per year, one column per month: SELECT count(substr(ResBookingDate,6,2)=01), SELECT count(substr(ResBookingDate,6,2)=02), SELECT count(substr(ResBookingDate,6,2)=03), ... etc... GROUP BY year .... <0> long query, but the PHP will be about 2 lines to output the whole report. I like. Thanks for the discussion/inspiration, folks. <1> i think you want a WHERE year < whichever; clause <4> why is this trying to create ibdata1? <0> is 'Dec' a reserved keyword? <0> I ***ume it must be.. <5> !m IdahoEv reserved words <6> IdahoEv: (Treatment of Reserved Words in MySQL) : http://dev.mysql.com/doc/mysql/en/Reserved_words.html <7> ) <8> how do I delete the row owner after: CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20)); <8> anyone? <4> I'm getting an error mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) <4> how can I diagnose why it can't connect <9> tdb30_: do you have a file /var/run/mysqld/mysqld.sock ? <9> it should be a socket type <4> yes <1> tdb30_, are you chrooting? <4> I don't think so <1> your socket has the appropiate permissions? <4> it says srwxrwxrwx <1> that's quite difficult to say <10> I need to get all unique words as delimited by white space in all rows of a column, with a count of their occurance, is this possible? <4> it says I don't have permision? <11> sure fulid <10> what do i use to explode? <12> rofl <10> ulth <10> if I fulltext it, can i get at the fulltext index to do this? <13> how do you re-generate indexes in tables? <13> to optimize the db.. as it's coming to a crawling speed right now.. with only 20k rows in the big tables <14> hi i want to add on the query the i made, another column having the tablename, like "SELECT *, tablename ........" <14> any clue ? <1> you want that to be found automatically? <14> i need to add in the result, the tablename where it was found it <14> so i wont have to work on the array later, and it would be easier <1> but you still need to explicitly specify the table name in the FROM clause <14> exactly, iam specifying that field <1> so you might as well just say SELECT *, 'fish' FROM fish; <14> that was my question :P <14> thanks <1> oh :) <14> ill see if it work <1> i ***ume you can select strings in mysql <14> done <15> InnoDB: Error: InnoDB has waited for 50 seconds for pending <-- i'm seeing a LOT of these messages while innodb tries to recover from a crash... will they eventually go away, or am i stuck in an infinite loop? (is innodb really doing something?!)
<14> thanks kate <14> you just made me more lazy with querys :P <1> i have to ask, why does your client need the tablename? <13> I have a serious problem here.. I have full_text_searches going on.. and it stalls the entire database when I try and do them <14> kate`: to encode and used later to launch a query, so i have to stored the whole query <1> i see <14> results in fact, the query is useless <16> Where can I find a good open-source pastebin? Like the one on http://hashmysql.com/paste/ ? <16> My host doesn't support RoR and the one on SF isn't any good. <1> rafb.net, perhaps? <16> http://rafb.net/paste/highlight.phps <16> That's all thats there <1> oh, i ***umed he'd released the source <16> That's what I heard too..but no. http://code.bulix.org/index.phps <16> That is open-source, but I am not sure how to change it to connect to my database, and I don't know how the tables are setup. <17> $db = mysql_connect (CP_DB_HOST, CP_DB_USER, CP_DB_P***); <17> mysql_select_db(CP_DB_NAME, $db); <17> change cp_db_host to the database server link <1> don't do that <17> Coh lol <17> Sry. <17> Don't do that <1> FlyingFrontier, read db.inc.phpdb.inc.php <1> h <1> uh* :) <1> db.inc.php <1> i got a bit carried away typing that <16> kate`: How? <17> What script are you guys talking about <1> FlyingFrontier, with your text editor <16> http://code.bulix.org/index.phps <1> FlyingFrontier, it contains define()s that set the constants NiGHTFiRE mentions <16> He didn't release that part. <1> redefine them to your databases' details <1> well, make them from scratch, then <16> What about the tables part? <1> either infer the schema from the statements, or email him for advice <1> or, find a more professional (i.e. documented) project <16> kate`: I was looking for one, I couldn't find one with the syntax highlighting his has. <1> there are generic syntax hilighting libraries; just stick in a call to one of those <15> any official support rep's in tonight? <16> Is the pastebin on hashmysql.org open-source? <18> hi <18> can someone tell me how i could dump a single table from a db and restore it somethere else ? <18> anyone alive ? :) <19> I'm not aware that anyone from MySQL AB is *ever* in here <19> those would be the only "official support reps" <18> right, and you guys just sit around and jack off ? <18> don't answer that <15> heh it happens from time to time... <18> apokalyptik, can you help me ? :) <18> mysqldump -u root -p fsbo usagelog | mysql --host=192.168.0.7 -u root -p -C fsbo <15> heh yea (now that i read up ad see your question <18> is this the right idea ? <15> mysqldump --opt -u(user) -p(p***) (database) (table) | mysql -u(user) -p(p***) --host=(host) -D (database) <18> thanks man <15> yep <18> works, sweet <20> whats the mysql cli cmd to show existing tables in a db ? <21> Howdy. <20> hey <20> Anyone? <21> show tables;? <18> hjack, show tables <18> hjack, you need to connec tto th edb first <21> A quick google request would've told you that, by the way. <20> Iwas doing that atm <20> lol <21> Anyone got an idea why my program reconnects to the MySQL server (after a lost connection) when I run it manually, but when the same binary is started as background process, it stubbornly refuses to do so? <18> is there any way to dump and restore tables using a wild card ? <18> Thialfihar, different environment perhaps <18> different path, effective UID <21> What sort of environment would prevent the reconnection? <18> different username, incorrect path
Return to
#mysql or Go to some related
logs:
how to close synaptic ubuntu automatix password stored in kopeterc sp16780.exe debian rssh execv ioctl(SIOCGIFINDEX): No such device gentoo gentoo alsa Could not detect custom ALSA settings #perl ubuntu netgear wpn311 gisomount #debian
|
|