#mysql
11 October 2007
Total 31 pages. You are browsing page 4/31.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
02:18 <****> robboplus, probly better than 90%
02:19 <****> no, because you know that everyone who still has passwd "apple" was affected by the mistake
02:19 <****> so you know who you need to contact
02:19 <****> oh wait
02:19 <****> that's something.
02:20 <****> You can generate new passwords for everyone relatively easilly... Is there a way to mass notify them that their passwords were changed?
02:20 <****> goota roll
02:20 <****> no kidding this is a good advice, olinux
02:20 <****> pity
02:20 <****> i need someone to take over my thinking as i simply can't right now
02:20 <****> good thing is that i got 3-4hrs to clean up the mess...
02:20 <****> Annihilation: yes, mailing lists
02:21 <****> restore your backup to a new table (not over your existing)
02:21 <****> proqesi: I'm asking specifically about robboplus's system
02:21 <****> Annihilation hm, yes, i could mail everyone who are affected to stay calm and wait
02:21 <****> backup your current table and get the syntax correct
02:21 <****> and then do it
02:21 <****> AND i can find out WHO is affected by simply using olinux's advice
02:21 <****> olinux right.
02:21 <****> and you can fix the prob so most dont have to know :)
02:21 <****> robboplus: yeah, restore from backup to users_backup, update the existing table with the old info, then generate new passwords and notify anyone who still has "apple" as a password
02:22 <****> i will try to calm down first and take it slow
02:22 <****> thing is NOT to make too much rush... we don't want anyone to know what has happened lol
02:22 <****> a short question: is there any way to get syntax highlighting in mysql? would be easier to read the queries then
02:22 <****> Annihilation it will look like a regular password change :)
02:22 <****> robboplus: and if you get this all handled before anyone comes in and needs their password, they'll just see an e-mail in their message box saying "your password was changed for security purposes, new password is whatever"
02:23 <****> OR
02:23 <****> Annihilation right :)
02:23 <****> you could just change EVERYONE'S password
02:23 <****> robboplus: you want it to look like their passwords had a routine expiration :)
02:23 <****> right.
02:23 <****> great help guys, i'm nearly crying lol
02:23 <****> rofc?
02:23 <****> yes proqesi lol
02:24 <****> hah
02:24 <****> well i just hate it that there is no confirmation in mysql shell
02:24 <****> it SHOULD ask a question
02:24 <****> if it can see that this operation will affect this or that number of rows
02:24 <****> there's no confirmation w/ phpmyadmin either, or with a programatically inserted query.
02:24 <****> Hey, I've got a table set up like, id|parentId|name, where parentId links to id. I'd like to get every parent of a select. Can I do that?
02:24 <****> so i could set a treshold myself
02:24 <****> isn't it smart thing to do?
02:25 <****> smart thing to do is design a user admin interface
02:25 <****> WARNING: this operation will affect 3121 rows. Are you sure You want to continue with Your query?
02:25 <****> so you don't have to worry about the shell and it's caveats.
02:25 <****> i love mysql shell
02:25 <****> it's just... not for idiots.
02:26 <****> heh
02:26 <****> and i feel like one now.
02:26 <****> GUIs have caveats as well
02:26 <****> like i said, everyone has their update story :)
02:26 <****> right proqesi
02:26 <****> Annihilation agreed
02:26 <****> well i went tru worse hell...
02:26 <****> robboplus: and some way for the users to change their passwords w/out needing the helpdesk would be great for everyone involved.
02:26 <****> i once dropped a working database...
02:26 <****> I used to use an IDE which required you to recreate all the source and project settings in each upgrade
02:27 <****> Annihilation yes, this makes me think of a solution like that
02:27 <****> so any benefit of point-and-click was completely gone 100x over
02:27 <****> hm
02:28 <****> what kind of software are your users logging into with these accounts?
02:28 <****> ok coffee time and some work to do now...
02:28 <****> fortunately they aren't making those products anymore
02:30 <****> Is there a function like mode? Something that returns the mode frequent entry in a column?
02:35 <****> lgbr: try: select count(column) from table group by column
02:36 <****> hi could someone look at this issue for me http://dpaste.com/22010/ i put it there as ive tried to inlcude a breif sample of the table to illustrate my question a bit better
02:36 <****> select column, count(column) from table group by column
02:38 <****> how many different brands are there?
02:38 <****> wanderingii: how many brands are there?
02:39 <****> could be unlimited brands but id like to do the query where i could just go through it sort of manually and say if brandname in products = sony then brandname in products 2 = 1 etc
02:40 <****> i have a table brandnames with all them listed its simply brandid and brandname if i was able to match the value from that table to products and get the id for that brand and insert it into products 2 that would be brilliant
02:41 <****> how many brandnames currently exist in your brandname table?
02:41 <****> if you only have like 8 right now
02:41 <****> 148
02:41 <****> oh
02:42 <****> with the idea to from this point on just store the ID of the brandname and link to the brandname table, right?
02:42 <****> do you HAVE to do this with mysql?
02:43 <****> is there another way apart from doing them all manually?
02:43 <****> because if i were you, i'd use a language to get a list of the brandnames and ids, then create an update query for each brandname for the product table...
02:43 <****> select * from brandnames
02:44 <****> then foreach result, update products set brandname = result[brandid] where brandname = result[brandname]
02:44 <****> hmm dont know how to do that
02:45 <****> wanderingii: sorry, I don't know how to do what you're looking for in mysql :/
02:47 <****> know hwo to do it any other way?
02:47 <****> is text or medtext larger?
02:47 <****> hrm.. it looks like it should be possible though
02:48 <****> update table1, table2, set table1.brandname = table2.brandid where table1.brandname = table2.brandname
02:49 <****> do i need to do update table1, table2 if id only actually be updating one table?
02:49 <****> wanderingii, is this what you want? UPDATE products JOIN brandnames ON (products.brandname = brandnames.brandname) SET products.brandid=brandnames.brandid; ALTER TABLE products DROP COLUMN brandname;
02:49 <****> (obviously don't run this unless you're sure it's what you want! use test data/have backup ready)
02:50 <****> I'm assuming you want to put the id into a new brandid column that you've added to the table, not into the brandname column.
02:51 <****> well i wont be dropping any columns
02:51 <****> wanderingii, but brandname is the wrong datatype for a brandid. It's a VARCHAR or something, it should be some kind of INT.
02:52 <****> you should be able to store the int values in the varchar column, then change the type afterwards though
02:52 <****> see im trying to restructure the table a bit and the new column in the new table is set to an int the old one was varchar
02:53 <****> Annihilation, true.
02:53 <****> wanderingii, so then don't drop the column, if you don't like. Either way that query should do what you want, I think.
02:54 <****> yea im just trying to check over everything here to see if it does the trick
02:54 <****> pretty sure this just worked for me:
02:54 <****> update products, brands set products.pbrand = brands.bid where products.pbrand = brands.bname
Total 31 pages. You are browsing page 4/31.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
