| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Comments:
<0> eleftherios : Ok. Long shot anyway. :) Hmm, I'd possibly call the cl*** mkq. <1> mkq? <1> CareBear\, that will be too minimalistic for my boss <2> Did I understand INSERT IGNORE right : if the index already exists, it doesn't get inserted, and doesn't return an error? <3> retro_neo: if the value is same as an existing row iof a unique key or primary key column <0> Why oh why doesn't the prepared statement work properly? <3> CareBear\: have you test it on mysql cli <3> CareBear\: you use mysql_query with EXECUTE ? <0> lokus : Nope, I didn't know I could. (It's a plain select of a few fields with just one parameter.) <0> lokus : No, mysql_stmt_* <3> CareBear\: then you shuold report a bug with repeatable test case <0> lokus : Ouch. I was pretty sure this was caused by SBS.. <4> hi all <0> lokus : (SBS=user error) <4> i've got a question <3> CareBear\: user or developer ?
<0> lokus : I'm a developer, but a user of the C API. ;) <4> why the word 'rohs' is not indexed on a fulltext index? anybody can put some light? <4> sorry if any typo, my keyboard is sscrappy <3> CareBear\: sure, maybe you want to read the c api manual mroe carefully before trying again <5> yorkensen cause your fulltext index is configured to index words longer than 4 chars by default. <0> yorkensen : There's a lower limit on word length IIRC. <5> yorkensen: have a look at http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html <0> lokus : Well, I have read the stmt parts a few times already, and my code looks a lot like the one in the stmt_execute page. <6> hi <0> lokus : The only reason I'm not just moving on is that I think I had the prepared statement working last night.. <6> is there anything special to do to upgrade to mysql 5.0 from mysql 4.1 ? <7> sure, uninstall 4.1 <7> and install 5.x <3> CareBear\: i am not familiar with prepared statment much <6> Sneaky_Bastard: and the data in the current database ? <0> lokus : That's all right. I appreciate your input anyway! :) <4> zeitouon, carebear <7> data in the current database(s) plural <7> you just copy /var/mysql somewhere <3> CareBear\: the example shows insert only right <7> tarball it, or whatever <7> and that's your backup <6> Sneaky_Bastard: so the format has not changed then ? <3> CareBear\: maybe you can try to get the file mentioned in the Note after the example <7> uninstall of mysql 4.1 should not remove anything in /var/mysql <7> xroberx this is not microsoft-land <0> lokus : True. I'm p***ing data the same direction though, the variable is in the where clause. <3> !man upgrading 4.1 to 5.0 <8> (Upgrading from Version 4.1 to 5.0) : http://dev.mysql.com/doc/mysql/en/Upgrading-from-4.1.html <7> it's backwards compatible <6> thanks lokus <7> back up the tables directory anyway <0> lokus : That's a good idea. Argh. I should have remembered seeing that yesterday.. <7> (/var/mysql) <3> CareBear\: but fetching the result set from a select and executing insert without result set may be slightly different <7> of course, do it with the server shut down <4> aaarrrg1 my keyboard! <0> lokus : Boom. Oh yes. <4> zeitouon, carebear: the word length is not the issue, I can find somee other 4 chaar words <0> lokus : That's it. I was using store_result()+fetch_row() when I should have been using stmt_fetch() instead. <0> Oh! I have to use result bindings for prepared statements. Aha. :) <9> can I do do more than one "SET somefield=something" in a single UPDATE ? <0> lokus : Thanks a ton for hitting me with the clue stick. :) <10> SteveWrightNZ: Sure. <10> SteveWrightNZ: UPDATE ... SET f1=4, f2=6, ... <9> ahh, commas <9> leet, it works.. 8-) thank you my guru <11> Any idea why this problem is occurring: http://dhruba.net/314/ <4> zeitouon: the word length is not the issue, I can find some other 4 char words <3> yorkensen: try to insert a new row with the word you cannot find, and test again <3> yorkensen: another test is to try the boolean mode <4> lokus: I've done it in 2 different plataforms <4> boolean mode not tested <3> if the word appears in more than half the rows, it will not be returned <3> boolean mode does not have this restriction <12> Narada: how are you actually expecting to get the result set returned from that procedure? <4> this is the key I think then! thanks so much <11> infi: php+pdo; not sure what you mean <12> Narada: review http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html again, specifically the IN | OUT | INOUT proc_parameter sections.. <12> Narada: and check out the example procedure toward the bottom of the section. <3> infi: mysql stored procedure can return result set without the OUT
<12> lokus: yes, but only with a SELECT statement (according to the docs) <12> he is trying to return the results of SHOW VARIABLES <12> haven't tested it, but I suspect that it won't work. <11> infi: This works on command line and query browser. <13> morning:) <11> morning <14> hi all <13> haly <14> I need some advice <3> Narada: but some clients library may not support it <3> Narada: what if you do $stm = $dbh->prepare('SHOW VARIABLES'); <3> Narada: does it work? <15> i got some problems selecting from the mysql-database: when i do WHERE foo LIKE "a%" i got entries that start with "" aswell. <11> lokus: I will try now. <15> any idea how i can fix that? <14> I have a select a,b from table ordered by a. How can I get the index of the n result in this select, but in a select ordered by b? <3> Narada: i am not familiar with PDO, but the vardump of fetchALL looks suspicious, usually it is not so simple to get the result set <11> lokus: That works. It only happens when using a sproc and prepare. <14> Have I been clear? <3> Narada: another test you can do, call SHOW VARIABLES directly in the stored proc without the prepare <3> _Pep_: not clear <14> mmm <11> infi: I'm not really sure how to incorporate an OUT parameter for a select like that? Anything you'd like me to try? <11> lokus: Trying now. <3> janhaa: the a and the A are treated the same depending to the collation <14> I'm paginating and I want to change the criteria, but stay in the register <15> lokus, yeah, but not ""? <3> janha: it is sometimes, depends to the collation <11> lokus: That works too. It is the sp with prepare that is the problem. <11> lokus: I need that combination because I'm dynamically constructing parts of the query with concat. Let me give you an example: http://pastebin.com/653076. <3> Narada: then, that is weird, if the PDO is able to get the resultset from sp then the prepare inside sp should be fine too <15> lokus, ok. where can i read more about "collation" ? <3> !man collation <8> (Information Functions) : http://dev.mysql.com/doc/mysql/en/Information_functions.html <3> not this <11> lokus: I am at a total loss about this. Such a weird problem. Thanks for your help anyway. <15> "not this" ? <3> janhaa: dev.mysql.com/doc there is a chapter on character set or unicode <12> Narada: let me set up a test case,. <3> janhaa: http://dev.mysql.com/doc there is a chapter on character set or unicode <11> infi: Thanks. <12> aye, jussec <15> lokus, ok. so it's really an charset issue? is it possible to change the charset? i think i've stored utf-8 chars in a iso-8859 table :-/ <12> Narada: take me a few minutes, I have to write a wrapper script, too ;) <3> janhaa: can you do a select hex(col) from table .. to get the hexadecimal value <15> lokus, ok...? <11> infi: np <3> janhaa: the A with ~ has value C3 and in the latin1_swedish_ci it has the same collation value as 'A' and 'a', so it is expect to match <14> I have this: select a,b from table order by a limit 9,10 <- so I get the 9th register in the table ordered by a <15> lokus, ok. <14> and I want to traspose this 9th register, to the x register in select a,b from table order by b limit x, x+1 <3> janhaa: if you don't want it, change the collation or configure your own collation <15> lokus, ok. i'll read about it now... <3> _Pep_: not so simple to find the x, not sure if possible of not <12> Narada: for one thing, I notice you are not testing the return value of $stm->execute() before dereferencing it. I just did it (in perl) with your same function, and am receiving: <3> _Pep_: unless you know the primary key <12> Narada: DBD::mysql::st execute failed: PROCEDURE test.testing can't return a result set in the given context at test.pl line 23. <12> Narada: you should check that. but anyway, let me see how to return the result set. <14> lokus: how? <14> lokus: I know the primary key of the register <3> _Pep_: from the row you have retrieved, you know the pk value <3> _Pep_: let me try something, not so easy after all <3> _Pep_: ok, try this set @a=0; select @a:=@a+1 from table group by pk having pk=value <3> _Pep_: what is returned should be the x value you want <3> _Pep_: wait <3> _Pep_: ok, try this set @a=0; select @a:=@a+1 from table orderby b group by pk having pk=value <3> _Pep_: sorry, it is NOT going to work <16> hey <3> _Pep_: maybe this set @a=0; select a from (select @a:=@a+1 as a,pk from table order by b) as new where new.pk=value <16> can I do something like.. SELECT (Average of field Rate) FROM tbl WHERE (TeacherID='1') ? <16> like I want to get the average of all the Rate fields where the TeacherID is a certain number <3> endra: group by and aggregate function <16> mm <11> infi: k
Return to
#mysql or Go to some related
logs:
BLKROGET failed: Inappropriate ioctl for device hdparm mepis ioquake3 debian smcwpcit-g apt-get #javascript aprofile_ctl python XF86AudioPlay #mysql oracle select name group reserved keyword drupal pagetree #ubuntu
|
|