#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10 11
Top Prev 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 Next
#mysql
<poncha> oh :(
<poncha> ok, thanks
<CareBear\> poncha : You could try replacing the entire string with a variable.
<CareBear\> to @userhost ...
<poncha> hm
<poncha> i'll try
<CareBear\> set @userhost=concat(@user,'@',@host)
<CareBear\> But note that you can't have as long usernames then.
<poncha> nope, the @userhost is also causing error
<poncha> cause it looks there for @ as a separator between user and pass :/
<poncha> err
<poncha> user and host
<CareBear\> Yeah.
<CareBear\> Use out-of-band replacement.
<CareBear\> sed e.g.
<CareBear\> That's what I do.
<MidMark> is there a way to maitain order field for table's rows?
<archivist> MidMark, use order by in your selects
<MidMark> archivist: yes, but I mean: if I want to maintain a column that tells the row orders and then if you put a new row then you can choos the order, the only thing I've thought is to maintain a column with 1, 2, ..., n but it is not efficient
<MidMark> for example if you have order 1,2,3,4 and then put a new row that should take order 2, then 3 and 4 should become 4 and 5
<MidMark> of course also 2 should become 3 :)
<snoyes> You could always make it a 'linked list' of sorts.
<archivist> insert 2,5
<archivist> 2.5
<archivist> snoyes if I ever write an engine, the "linked list" will be an important part of it
<MidMark> archivist: yes but I have to calculate a new number between the record before and the record after
<MidMark> snoyes: what are linked list?
<archivist> each record has a parent and child id/pointer
<snoyes> MidMark: in this context, it would mean that rather than storing the absolute position in the order, you would store the id of the element that comes before or after. So 1 would contain a reference to 2, which would contain a reference to 3
<snoyes> A doubly linked list has references to both before and after, so 2 has a reference to both 1 and 3.
<snoyes> Then when you insert a new row, you just "break" the links in two rows and add the new one. So now 1->5->2->3
<MidMark> snoyes: interesting
<MidMark> is it a special table?
<snoyes> One advantage is that even if you insert into an early part of the list, you only have to update two rows, plus the one you insert. You don't have to update every following row in the table.
<nils_> ah basic concept for storing data.
<snoyes> No, there is no special table to handle it, and it will require you to write some application code to keep it all straight.
<MidMark> snoyes: yes I have understood is like double pointer queues done in C or whatever language
<snoyes> Exactly.
<edi> please, anyone knows mysql-cluster?
<MidMark> snoyes: you mean that I have to implement it just inserting two new columns with id_prev and id_next?
<snoyes> yes
<MidMark> And I can order for one of those two when selecting * ?
<nils_> edi, I heard about it ;)
<snoyes> MidMark: Probably; I'm trying that out now.
<MidMark> snoyes: thanx a lot
<js_> what is the best way to vertically align an image within an element to the middle? ive never managed to use vertical-align: middle
<snoyes> js_: Surely that's a question for #html
<Mots> hi, some noobs convinced me to make their hp, but only gave me ftp-data...(they dunno anything about servers) Is there any way to find out if there's a sql-server running?
<edi> ok, thanks, i will look for more documentation. bye
<js_> snoyes: oh, haha, i thought i was in #css
Previous Page Next Page