@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15



Comments:

<0> not cat.siteid= '2'
<1> ok good tip.
<0> also change your left join into inner join
<2> if you can.
<1> it will work just the same without changing anything else?
<0> the difference is that left join also takes care of the non existing rows and fills those values virtually with NULL
<3> i got http://pastebin.com/721571 if anyone would care to help me
<0> whihch makes it slower if you have no need for taking care of non existing rows
<0> inner join will bring you only the rows which exist in both tables
<4> there is noting in the mysql.err nor mysql.log
<4> and --user=mysql doesn't change anything
<1> end result is I have two tables, site_articles and categories. Where the site_articles.OverrideCategory and catory.cid is the same, I want to select 1 row, and never select another row if the cid has already been selected
<2> it probably can't read ~/mysql-init
<0> l00pdee looks like bad code :P
<2> try putting it in /tmp or mysql's datadir
<5> stupid question - if I wanted to store an international telephone number in the database, is it a bad idea to use BIGINT?



<3> ugh
<2> i'd use varchar mugger
<2> telephone numbers aren't integers
<2> they're strings
<0> l00pdee: why not select the sum into php for both queries and then perform the subtraction in php ?
<0> no need to take another roundtrip towards the mysqlserver
<5> gleam-: mm okay, was going to store it as numeric only, but varchar sounds good
<2> remember that stuff like +, -, and spaces often are meaningful in phone numbers
<4> gleam-, that's right, now it works but while trying to connect : ERROR 1045: Access denied for user: 'root@localhost' (Using p***word: NO)
<2> yes that's because the init file changed your p***word
<2> specify the p***word you set
<2> mysql -uroot -p
<2> enter p***word
<4> nice
<3> yea i will ahve to change my php/xml engine for that one.. just trying to find an easy ay out .. oh well
<4> the documentation doesn't say all that
<2> romz: now i'd shut down teh server and start it up normally
<2> it's not a huge deal
<2> but you might as well
<2> uh huh
<2> heading home
<2> bbl
<4> ok i can log in phpmyadmin, i changed the p***word for localhost and my hostname, and now i can't log in
<4> i put the P***WORD type
<4> but it doesn't accept, do i need to restart the server when i change any p***word for root ?
<6> Romz: no need, if you know the existing root p***word
<6> Romz: if you don't then need a restart
<6> Romz: at least a restart of the mysqld
<4> lokus, i reset my p***word, i changed it, now i login but it fails
<7> Whats the difference from set var1 = 1; and set @var1 = 1; ?
<6> @var is a user variable
<6> i guess var1 is in stored proc
<4> lokus, i guess i need to restart it so it update permission/privileges things
<7> lokus: yes as is in stored proc/trigger.
<6> Romz: not really, the restart is to reset your root p***word without knowing the existing p***word, thats all
<6> intercool: so var1 is the variable in sp, @var1 is the user variable
<6> intercool: not sure if you can use user variable in sp or not
<7> im wondering, i want set var = instr(col1,'string') ; to be executed when i do IF var = 1 then do whatever..
<6> intercool: correct
<6> !m Romz reset p***word
<7> okay, thanks..
<6> Romz: have you read this, read it carefully
<6> !man reset p***word
<4> lokus, yes
<6> Romz: it should be clear enough
<4> lokus, i logged in with a reseted p***word, i changed it in the user table, i Restart mysql (in phpmyadmin), i log in with the new p***word i just set, it works.
<6> change in user table? using update ?
<4> using phpmyadmin (so yes)
<6> then it is the BAD way of changing p***word
<5> What would ALTER TABLE `members` ADD UNIQUE (
<5> `approved`
<5> )
<5> oh ****
<5> my bad
<6> use the correct way, SET P***WORD
<4> ok
<6> Romz: and you are likely to set a wrong p***word since the p***word column needs to be hashed
<5> Well what would ADD UNIQUE do? I definately don't want the `approved` field to be UNIQUE ( accidently click on a damned button in phpmyadmin )
<6> mugger create a unique index on the approved col
<7> http://pastebin.com/721587 <-- is the substr right at line 59. I dont get any syntax errors but the script doesnt do its job..



<6> check line 58
<6> intercool: and are you sure it entered line 59? there is a conditional branch outside there
<8> Hey guys i got a problem with a logincheck (aslong as the username is valid, it can login with anything as a p***word) not sure if its the query or not, so i am posting it here as well in PHP, if anybody has a minute, here it is http://xpowerstudios.pastebin.com/721574
<9> why is a unsigned decimal(3,2) only allowing 9.99 when a signed decimal(3,2) allows 99.99 ?
<9> wouldnt unsigned be theo ne that might be larger not having to worry about +/-
<6> xpowerstudios: whats that?
<6> kib: 99.99 or -9.99
<6> kib: unsigne, only need 9.99
<8> lokus: What is what?
<6> xpowerstudios: what did you pastebin? does nto look like sql at all, if php go ask in #php
<8> lokus: If you look closer inside the query you will see SQL, and a post has already been made in #PHP :)
<7> lokus: I dont what it entered, all i know is that it doesnt work, and i have no way of debugging it in mysql
<6> xpowerstudios: then make sure it is the sql that is the problem and ask with the exact sql statement
<9> lokus: but why doesnt an unsigned decimal(3,2) allow 3 digits before the decimal
<9> or at least 2
<9> why is unsigned smaller then signed?
<9> this seems backwards to me
<6> kib: you need only 4 characters for unsigned, so 9.99
<6> kib: for signed, it need 1 more character, so -9.99, since there is already 1 extra char, it also allows 99.99
<8> lokus: I am posting both in here and in #PHP because of the fact that i'm not sure whether it is the query or not, enough of that already . If anybody has any minute to look it over it'd be appreciated
<9> but It hought 3,2 means 3 digits, then decimal point then 2 digits?
<6> the space taken by usinged (4,2) is the same as signed (3,2)
<6> kib: correct
<9> so making it signed literally adds one more digit then what you might have asked for
<6> kib singed will add 1 more - in front
<9> and positive numbers make use of that digit since its not needed for the neagtive sign
<6> kib: - 1 byte, . is also 1 byte
<6> kib: yes, you got the idea
<9> that stills eems weird but it does make sense now...3,2 should be xxx.xx if you ask me. 3,2 should allow 999.99 to -99.99 and unsigned just 999.99 to 09.00
<9> I meant 0.00
<9> at least that would make more sense to me
<6> xpowerstudios: you should debug your php and find out what or where is the exact problem, users here are not your debugger
<6> xpowerstudios: and your script does not look complete, what is $sql ?
<8> lokus: I didn't claim anybody to debug anything for me, don't make ***umptions - if anybody wish to help that is up to them to give me a hint. If not, that is up to them
<6> xpowerstudios: i am not going further with this unless you come back with the exact sql with pbolem
<10> how would i set an already-existing field to AUTO_INCREMENT ?
<0> Ricky28269: ALTER TABLE
<10> yes but what would be the exact command?
<10> phpmyadmin has malfunctioned on me, btw, if you were wondering why i need to know this :)
<6> you need to know that auto_increment column need to have an index first
<10> it is a column called id, and it is already a primary key and all that
<10> but somehow, when i moved my data to a new mysql server, it lost the AUTO_INCREMENT attribute
<6> any error ?
<10> no, it moved over fine but the column does not have the AUTO_INCREMENT attribute
<10> and so i need to modify it to add that attribute
<10> and phpmyadmin is giving me some weird error "Duplicate entry '1' for key 1"
<10> I'm not even inserting, i'm just altering the column, i have no idea why it would complain of duplicate entry
<6> Ricky28269: the data has duplicates, so cannot make it primary key, is it primary key after the change or not
<10> it's already a primary key, i just need to add the auto_increment!
<6> no idea then
<10> it works completely fine, but my script doesn't work because it relies on being able to insert a new value with a blank id, which will auto_increment to the next available ID
<10> okay i just deleted that column and then re-added it, and it worked...
<10> i don't fully understand mysql, but whatever.
<6> but data in the column will be lost
<10> yup, and then it got unlost :)
<6> unlost ?
<10> the only data was the id, which is just a count.
<10> if it wasn't required, i wouldn't even bother having it
<10> well anyway ive got to continue
<6> and you can make it primary key? not likely
<10> bye, thanks for trying
<10> yea i did
<6> maybe it auto-inc for you
<11> what might be happening when I see this: #1016 - Can't open file: 'code.MYI' (errno: 144)
<12> AaronCampbell, oo .. oo .. I know this one
<12> I just had that happen to me
<12> not sure, but REPAIR TABLE fixed it
<12> lol
<7> lokus: you know of any way to test triggers ? some kinde og debugging mode ?
<6> intercool: no, maybe do some insert to a temp table or something, not sure if select var works in trigger or not, select var can be used in sp to output some debug information
<13> hey folks. for a db that gets lots and lots of reads and very few inserts/updates (in comparison) which would be the best table engine for speed? innodb or myisam?
<2> myisam
<13> thanks for confirming. already using it. :)
<2> obviously myisam has its drawbacks


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #mysql
or
Go to some related logs:

#qemu
#web
kasbar Ubuntu
pastebin vim colorscheme
fedora core beagleindex
Missing braces on \N{} + perl
#perl
#xorg
#lisp
cabextrac



Home  |  disclaimer  |  contact  |  submit quotes