Help Logs Database

Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Ircnet  |  Dalnet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

<shabbs> Gho5t: LEFT() or RIGHT() or SUBSTR
<Gho5t> thanks
<lugzer> hey
<lugzer> i constantly get error like this: Character set '#9' is not a compiled character set and is not specified in the.... it's on WinXP with Apache & MySQL.. what can i do about it ? any way to fix it ?
<mishehu> did you try checking the docs?
<mishehu> i don't have any experience with anything other than the latin charset on mysql.
<davidl> lugzer: what version of MySQL?
<lugzer> davidl, select version; right ?
<lugzer> it's 4.1, just want to get the full build
<davidl> right, or the message when the client starts
<davidl> Is it a localized version of WinXP?
<lugzer> 4.1.14-nt
<lugzer> davidl, yeah it's a polish version of WinXP
<lepine> does mysql not like time in H:m:s ?
<davidl> try "mysql --default-chatacter-set=latin1" and then do SHOW CHARACTER SET;
<davidl> -character-
<lepine> what's the correct format for time inputting ?
<lepine> date('YmdHis') this apparent;y isn't it ... unless there's something else im doing wrong.
<davidl> Time needs to be sent as a string fro the client
<lepine> so just cast it as a string ?
<lugzer> davidl, my character set is latin2 - i need it...
<davidl> i.e., INSERT INTO data (timecol) VALUES ('12:34:55');
<davidl> lugzer: Are you sure that you're using the client and server from the same distribution (no Cygwin Mysql3.23 client, etc.?)
<lugzer> my server is 4.1.14 for sure. the client im using is MySQL-Front 2.5
<lugzer> davidl, i can see now, the client library is of 3.23...
<lugzer> but i dont see a correlation between using mysql client and executing a script that connects to a database..
<lugzer> .. and it hangs because of something
<davidl> In the 3.x series, character sets were compiled in or loaded at runtime from flat-text files. See if there's a patch for MySQL-Fron.
<lepine> can i do anything right ? i now have an error on my date field ...'2005-10-25'
<lugzer> davidl, no apparent path to mysql-front..
<davidl> Have you tried the command-line client or MySQL Query Browser?
<lugzer> davidl, i've connected via command line:
<lugzer> mysql -uroot -p --port=3309 --default-character-set=latin1
<lugzer> (btw i dont know why it couldnt accept mysql -u=root)
<mendel> lugzer: "-u=root" tells MySQL to use the username "=root".
<lugzer> when i execute SHOW CHARACTER SET; it shows me a table with character sets
<davidl> What's the Polish DOS codepage? CP852?
<lugzer> ISO-8859-2
<davidl> That's probably the ANSI codepage; what's the Polish DOS codepage?
<lugzer> aha DOS..
<lugzer> CP852
<davidl> MySQL Query Browser uses the Windows Unicode APIs. If you do LOAD DATA LOCAL INFILE from a text-file prepared in Notepad, you'll need to tell MySQL to be using LATIN2 (=iso-8859-2); when doing INSERT and SELECT with the command-line client, you'll need to use CP852.
<davidl> Did you set MySQL to use Unicode internally by default when you installed it?
<lugzer> davidl, alright, thing is i never loaded data from a file, nor using a command line. everything from the client itself, or via php script
<lugzer> when i installed MySQL i've set the character set to latin2, because i was having #$!* instead of my polish diactric symbols
<lepine> alright, i know you guys don't parse sql ... but there's a discrepancy between mysql's parser and my own ...
<lepine> INSERT INTO log ('date', 'time', 'event') VALUES ('2005-10-25', '11:02:06', 'Backend STARTED')
<davidl> So do you have data in the database already, entered via PHP?
<lugzer> davidl, yes
<shabbs> lepine: `date`, `time`, `event`, use ` not '
<lepine> fsck
<lepine> i'm blind
<lepine> legally anyway
<lepine> thanks
<Cow_woC> hi
<Cow_woC> Is there a way to use mysqldump and have it dump the DB create info but not the actual data?
<alex43> Hi
<davidl> OK, if you do a "SELECT * LIMIT 10" from one of your tables right now, you should see wierd stuff in place of any Polis characters. If you do a "SET CHARSET cp852;" and then run the same select statement, you should see all Polish characters fine. If possible, I recommend that you try MySQL Query Browser.
<lugzer> davidl, you're right. everything is fine. as for MySQL QUERY BROWSER.. i used it.. i prefer MySQL-Front, though..
<lugzer> davidl, big thanks for your help !!!
<lugzer> gotta crash . thanks again !
<Gho5t> mysql front owns
<Gho5t> too bad they discontinued it
<alex43> I have a table named 'zone' (fields : id_zone, name_zone) linked twice with a table named 'link_zone' (fields : id_zone1 and id_zone2). I must do a query (join i think) to link this table and get the name of "id_zone1" and "id_zone2" instead of ids. My idea was : "SELECT * FROM `link_zone`, `zone` WHERE zone.id_zone=link_zone.id_zone1 OR zone.id_zone=liaison_zone.id_zone2;" but it doesn't work as
<alex43> i want. How to get it please ? Thanks.
<fritz_> can I somehow optimize this?
<fritz_> http://pastebin.ca/26616
<SunShineLady> Hello
<Bluemat> Is it possible to select a lowest, unique vale from a field ina table?
<Bluemat> lowest unique value..?
<Bluemat> e.g - say I have 5 rows and values for the field in question is: 1 , 1, 2, 2, 3
<Bluemat> The answer I want is 3, because it is the lowest unique value
<tradergt> max?
<dopplecoder> haha
<davidl> I'm hacking the MySQL source. I want to add an anonymous temporary table to a query, probably in handle_select() or open_and_lock_tables(), so the the query runs as if it was written "SELECT original_select_clause FROM my_table,original_from_tables WHERE original_where_clause"; in other words, the join will be within the where clause. What function do I call to instantiate such a temporary table?
<tradergt> I dont see how 3 is the lowest, to 1 and 2..
<|gatsby|> tradergt: unique...
<tradergt> and?
<tradergt> oh, I see
<tradergt> Bluemat: what version you have?
<|gatsby|> Bluemat: you will probably need to use a .. derived table that returns the mins ordered in ascending along with their counts, and then check for the lowest with count = 1
<Xgc> davidl: That's what a JOIN is for: SELECT ... FROM (original query) v1 JOIN your_table t1 ON (v1.join_key=t1.join_key ...) WHERE ... other filtering;
<Xgc> davidl: What you originally described was missing join criteria for your extra table.
<SunShineLady> Trying to SELECT table1.* FROM table1 and LEFT JOIN a table2.COUNT(*) - the COUNT(*) seem to be unwelcome, what can I do?
<captrespect> freenode #mysql > efnet #mysql ?
<Xgc> davidl: It's unlikely you wanted the cartesian product.
<davidl> Xgc: I'm adding new syntax to MySQL. Actually, I probably need to instantiate the table in some sense during parsing because the WHERE clause will refer to it.
<captrespect> if you do a string1 > string2 in a where statement will it compare alphabetically?
<Xgc> davidl: You wanted to implement this as a patch/update to the server itself? Ouch.
<|gatsby|> fritz_: sure.. you just need to use multiple table selects.. like select A.name from B LEFT JOIN A USING a_id WHERE B.b_num="31337" <--- something like that
<davidl> Yes. I've already modified sql_yacc.yy to accept some of the new syntax I want...
<jeffzz> select * from table limit 10; (takes 0.02 seconds) ... select * from table2 limit 10; (takes 0.02) seconds ... select * from table union select * from table2 limit 10; (takes 38 seconds); Anyone know how to get that to be faster?
<Xgc> davidl: What's the real requirement here? This seems questionable.
<Xgc> davidl: JOIN criteria doesn't really belong in the WHERE clause. This doesn't seem well thought out.
<Xgc> davidl: I'm really curious what this solves and how you plan to use it?
<alex43> Has someone got a solution to query a table with 2 ids joined with a table of one id, please ?
<davidl> OK, think of it as "SELECT stuff FROM my_table INNER JOIN other_tables USING (my_table.my_column) WHERE other_conditions".
<|gatsby|> alex43: perhaps an example will help
<Xgc> davidl: RIght, but why on earth do you need anything more than currently defined SQL? That's already supported.
<|gatsby|> I don't know what you mean
<davidl> My goal is to develop new syntax for SQL. My professor suggested I investigate "parameterized views", and this is what's come out of it so far.
<Xgc> davidl: I see. Are you building on existing VIEW(s) in 5.0?
<davidl> Yes.
<Xgc> davidl: What would your new syntax look like?
<will> jeffzz: Don't use UNION :)
<Xgc> davidl: Yes. Something like that could be useful.
<jeffzz> will, heh
<fritz_> |gatsby|, just a sec, let me try that
<jeffzz> will, seems like the optimizer should be able to speed that up
<will> jeffzz: Why?
<jeffzz> cause it's limit 10
<will> UNION doesn't just tack the second query to the end of the first query...
<davidl> Or perhaps CREATE VIEW order_lines TAKES PARAMETER dummy.orderId AS SELECT * FROM productXorder WHERE summy.orderId=productXorder.orderId;
<jeffzz> yep, but even still it should grab the first 10 rows in the first table (cause it's limited to 10.. so having more than that is ignored anyways)
<Xgc> davidl: Hmmm... That's a little less clean.
<will> File a bug report. I don't know the details on how a UNION works.
<will> But I know it does "extra" processing.
<jeffzz> will, it has a unique output so I ***ume it grabs all from left, all from right.. and then limits 01
<jeffzz> 10
<alex43> |gatsby| : I have a table named 'zone' (fields : id_zone, name_zone) linked twice with a table named 'link_zone' (fields : id_zone1 and id_zone2). I must do a query (join i think) to link this table and get the name of "id_zone1" and "id_zone2" instead of ids. My idea was : "SELECT * FROM `link_zone`, `zone` WHERE zone.id_zone=link_zone.id_zone1 OR zone.id_zone=liaison_zone.id_zone2;" but it doesn
<alex43> 't work as
<alex43> i want. How to get it please ? Thanks.
<Xgc> davidl: I'm not so sure it's a good idea to try to inject a variable table into the VIEW. I have to admit, I've run into a few cases where that came to mind, however.
<davidl> The idea is that a user would just type SELECT * FROM langlookup('ar') or SELECT * FROM order_lines(2813901), instead of doing the join or even a selection and projection from the view.
<davidl> Well, I'll keep looking for the right struct to create at view-creation and view-use time.
<jeffzz> alex, this may work... select * from zone a left join link_zone b on (a.zone in (b.zone1,b.zone2)) where b.zone1 is not null or b.zone2 is not null;
<jeffzz> that may work
<alex43> |gatsby|: did you understand ?
<jeffzz> select * from zone where zone in (select zone1 from link_zone union select zone2 from link_zone);
<jeffzz> that may work also
<alex43> jeffzz: oh .. thank you .. i didn't see you .. sorry ... gonna ry this . Thnks :)
<ph8> evening all
<tradergt> morning
<ph8> Is MySQL 5 completely backwards compatible or will i run into lots of problems if I upgrade to it?
<shabbs> !m ph8 4.1 to 5.0
<SQL> ph8: (Upgrading from Version 4.1 to 5.0) : http://dev.mysql.com/doc/mysql/en/Upgrading-from-4.1.html
<jeffzz> ph8, read the upgrading notes and follow them exactly.
<alex43> jeffzz: first one did'nt work : "b.zone1unknown in where clause" :(
<Sash> Hi, I got a performance question: I have a table with this row data: | 32bit int | 32 bit int | (a lookup/reference table) which has no updates, just inserts(few) and reads(a lot). The tricky thing is it will contain a huge amount of rows. Which storage engine is best suited for this setup?
<jeffzz> myisam
<Sash> jeffzz: is there anything I can tweak (per table base) to improve select speed (except indices)?
<jeffzz> Sash, there are settings you can tweak ya... key_buffer_size ... and a few others...
<jeffzz> it's best to read the chapter on mysql.com/doc/
<wfq> hi
<Sash> ok, gonna check. thx.
<inviso> !m Sash tuning
<SQL> Sash: (Tuning Server Parameters) : http://dev.mysql.com/doc/mysql/en/Server_parameters.html
<dopplecoder> so is mysql 5.0 the coolest thing since sliced bread or what?


Return to mysql
or
Go to some related logs:

papadyka
WoW patch 1.7.0 1.7.1 US
football
talisman of power wow

Copyright © 2005 www.irclogs.ws. All rights reserved. » disclaimer » contact