What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

It is well known that questions using mysql_* on Stack Overflow have been getting the canned

Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.

treatment.

So when I came across this question with almost 60 thousand views and all of the answers referenced the old (soon to be removed) mysql_* extension for php I thought that a new answer should be put there to show what one should do currently as opposed to editing the answer that was currently accepted and layed untouched for 3 years.

I stupidly asked chat to upvote my answer and downvote the current accepted answer (which is what was done for other answers that have come deprecated and in need of being replaced).

Instead of people helping me out, I was berated and told that I should not have done that etc.

I even got a comment on my answer asking why I did not edit the original accepted answer.


I did not feel that editing a really old answer was acceptable, especially changing it that much!

If I was wrong on my approach i will gladly delete my answer and edit the accepted one, I am just asking for what should have been the correct thing for me to do (when it came to that question, not to chat) and what should be done in the future if a user finds an outdated accepted answer.

share|improve this question
5  
    
@MadaraUchiha this has nothing to do with chat! –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:26
2  
No, which is why I didn't post it as an answer, but as a related comment. Please refrain from attacking people, we bite. –  Second Rikudo Dec 27 '12 at 21:27
    
@MadaraUchiha I am not attacking anyone. I mentioned no names in my post here. (although you did by posting that link). –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:28
2  
Keep in mind that sub-communities are allowed to develop their own standards for those aspects of SO that are subjective. If the PHP tag as a whole feels that editing all mysql_* used in answers (or possibly just the answers of canonical questions) to newer counterparts are acceptable edits then that's that communities prerogative. –  Servy Dec 27 '12 at 21:29
1  
Did you explain your reasoning when you asked for upvotes in chat? Although I think editing would probably be the right way to go, I can see the sense in asking for help to promote updated/correct information. –  Josh Caswell Dec 27 '12 at 21:32
    
@JoshCaswell it was moved to bin by the PHP admin... chat.stackoverflow.com/transcript/message/6894049#6894049 still do not know why.... –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:34
1  
Let's be clear. You did NOT get berated for adding the answer. You got berated for posting "Upvote my answer and downvote the accepted one". That is very much frowned upon (and discouraged severely). The answer itself was never a topic of discussion... Additionally still do not know why? Really? After it was explained in chat by almost every active person in the room that explicitly asking for upvotes or downvotes is not allowed in that room... And you still don't know why? Either you don't want to listen, or you don't care. Both bother me... –  ircmaxell Dec 27 '12 at 21:39
    
Off topic - it stands to reason the entire SO question could be burninated, seeing as Googling PHP: how to get last inserted ID of a table? leads to the canonical manual entries for both mysql_* and PDO. But seeing as our overlords have denied us the "General Reference" close reason... –  Pëkka Dec 27 '12 at 21:40
1  
@Pekka so let's close and delete it ^_^ –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:40
    
If there's a duplicate question with newer, more appropriate answers, just close this question as a dupe of that one. I'd be disinclined to delete an answer with that many links; better to just reference a better answer so people realize that it's not appropriate instead of just getting a 404. –  Servy Dec 27 '12 at 21:42
    
I think you did it right, that's way too much of an edit. –  Lance Roberts Dec 27 '12 at 21:51
    
@LanceRoberts thank you. Can you post that as a long type answer? ^_^ –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:52

4 Answers 4

up vote 7 down vote accepted

I think that was the appropriate way to 'fix' the question. Adding an answer is fine, it's way too much of an edit difference from the original accepted answer.

It probably would have been better to just post the link to the answer in chat, and not ask for the upvote. That's the way I usually handle answers or questions I feel need a little promotion.

share|improve this answer
    
Yea, that probably would have been a better approach, but that did not happen, and I paid for it.... –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:55
    
@amanaPlanaCAnalPAnaMA It's interesting to see that you accepted the answer that said "Your way was correct, but it might have been better to do this" even if it is not the answer that a large part of the community seems to think to be right... –  Jasper Dec 28 '12 at 21:39

The original creator of the accepted answer is active on SO so suggesting him (in a comment) to update his answer is the way to go.

share|improve this answer
    
This is also fine, but sometimes you don't get a response from people. –  Lance Roberts Dec 27 '12 at 21:55
    
Nice hat ^_^ :-P –  amanaP lanaC A nalP A naM A Dec 28 '12 at 15:38

Posting a new answer is fine, that's why we allow for multiple answers.

Bringing the answer in question (pun intended) to the community (or sub-community, for that matter) is fine. That's part of the reason we have chat in the first place.

Promoting your own posts for the sake of reputation, is not fine. And that's the feeling we got from your messages, even if you didn't originally intend it.


All in all, I see nothing wrong with presenting a hard-worked, well-written, well-explained answer to the community for review and upvoting. I personally don't think that the specific answer you've linked to meets any of these criteria. You could (and should!) have solved it by simply pinging the OP, or even, God forbid, as a 40k user, edit the accepted question yourself. If you genuinely want to help, make the important information most visible.

share|improve this answer
    
I never said anything about reputation. The other answer is wrong for the current usage of PHP. –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:36
    
The primary problem that I have with editing the answer (given my rather limited knowledge of PHP) is that it would be a very non-trivial edit that would be significantly changing the content of the post, which is really not appropriate for edits. That is, unless the answer was CW (it's not). –  Servy Dec 27 '12 at 21:37
    
Also the answer with the most upvotes is not a high quality, involved, or detailed answer for which most of the content is worth saving. It's nothing more than a link to a method, and if that method is no longer appropriate, then 100% of that answer is invalid and would need to be rewritten. If the code snippet to be updated was only 20% of the answer I'd be more inclined to try to find an appropriate way to edit the answer. –  Servy Dec 27 '12 at 21:40
    
this is the answer in question. I don't think that he put so much effort into it, that it's worth an upvote. It's technically correct, yes. How useful is it? Not as much. And by repeating himself over the manner, he didn't exactly help himself. –  Second Rikudo Dec 27 '12 at 21:43
    
@MadaraUchiha how correct is the accepted answer? That just gives how to do it for mysql_*? –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:45
    
@amanaPlanaCAnalPAnaMA: An accepted answer is just that. It's accepted by the OP as the answer which helped him the most. Do not mistake it as the correct answer, because it may not always be the case. –  Second Rikudo Dec 27 '12 at 21:46
    
@MadaraUchiha so why should I even edit an answer that may not even be correct? –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:46
1  
@MadaraUchiha If you feel the content that he's providing is not of particularly high quality or useful information, all the more reason he shouldn't edit it into a highly upvoted and visited answer that entirely replaces the content of the previous answer. Just to be clear, I'm not saying that Neal's answer should be upvoted, I'm just saying I don't think he should have edited that content into the top answer. –  Servy Dec 27 '12 at 21:47
    
@amanaP define "correct". Deceze's answer was clearly correct for the purposes of the OP at the time he accepted it. He didn't want to use PDO, and for the mysql extension, deceze's answer is still valid. I would have left it alone. –  Pëkka Dec 27 '12 at 21:49
    
@Pekka and if the question was asked now? deceze's answer would be downvoted to oblivion. I do not see your point.... –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:50
    
@amanaP so you propose downvoting all answers involving old libraries because we shouldn't use them any more, and replacing them with answers involving new libraries? I don't think that question needed fixing. (Except maybe burnination - IMO) –  Pëkka Dec 27 '12 at 21:51
    
@Pekka that is what the PHP room has been doing for a while. Putting out tons of cv and delete requests on old questions/answers. –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:53
    
@amanaP but there's a vast difference between that and what we're discussing here, isn't there? –  Pëkka Dec 27 '12 at 21:54
    
@Pekka not really... –  amanaP lanaC A nalP A naM A Dec 27 '12 at 21:55
2  
@amanaPlanaCAnalPAnaMA So you think closing/deleting is the same as posting a new answer, upvoting that answer a lot, and downvoting all of the old answers? It's worth discussing which is appropriate, but they're clearly different options... –  Servy Dec 27 '12 at 21:56

It completely invalid to edit like this what you need do is ask to OP to edit. As in your this answer and there is comment for that

enter image description here

share|improve this answer
2  
Could you please rephrase that? It isn't entirely clear what you're saying. –  Asad Dec 28 '12 at 15:36
    
i am saying that ..that same user telling that its invalid .. in a answer now did same thing .. –  NullPoiиteя Dec 28 '12 at 15:38
    
Ah, I think I see what you mean: Panama advocated commenting and asking the original answerer to update the answer, then went ahead and did the opposite. –  Asad Dec 28 '12 at 15:39
    
@Asad I did not post a duplicate answer with the same information. I posted a new answer with new information. BIG difference. –  amanaP lanaC A nalP A naM A Dec 28 '12 at 15:40
    
@Asad exactly ... also he did rollback –  NullPoiиteя Dec 28 '12 at 15:40
    
@NullPointer rollback what? I did not edit any answers! –  amanaP lanaC A nalP A naM A Dec 28 '12 at 15:41
    
@amanaPlanaCAnalPAnaMA you rollback my edit and than post is not useful for future visitor that why i have to give a new answer ... and what about this stackoverflow.com/a/1685867/1723893 edit this is same case .. –  NullPoiиteя Dec 28 '12 at 15:42
    
@NullPointer lol your edit was just adding links. you edit (and answer) added nothing new. –  amanaP lanaC A nalP A naM A Dec 28 '12 at 15:43
    
@amanaPlanaCAnalPAnaMA not only link but also information ... also if i added only link its completely according to stackoverflo check to add related resources or hyperlinks in edit privilege page.. what you need to do is ask to op first to add about this ...... and you didnot ... –  NullPoiиteя Dec 28 '12 at 15:45
    
@NullPointer your edit was trivial and added nothing to the original post that could not have just been a comment. –  amanaP lanaC A nalP A naM A Dec 28 '12 at 15:46
    
@amanaPlanaCAnalPAnaMA I'm not entirely clear on the background of this, but in the quoted answer you are claiming NullPointer added too much information, yet you are also saying he did not add enough information. You can't have it both ways. –  Asad Dec 28 '12 at 15:47
    
@Asad thats exactly i am telling ... –  NullPoiиteя Dec 28 '12 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .