37

There is a question, mysqli_query() expects parameter 1 to be mysqli ( it is mysqli though ), that genuinely seems to me to be a duplicate of Warning: mysqli_query() expects parameter 1 to be mysqli, null given in in every aspect - the title, the question body, and the answer are almost literally the same.

Yet it has been reopened. Do I fail to see some essential difference or any other reason?

24
  • 11
    They certainly look like duplicates to me, with the limited php experience i have.
    – Kevin B
    Oct 13, 2015 at 17:55
  • 42
    To whoever is voting to close this question as "Primarily Opinion Based": Questions asking why a question was reopened are most definitely not off-topic for Meta.
    – user4639281
    Oct 13, 2015 at 18:01
  • 9
    If anyone is down voting the linked to question/answer please do it for their content and not because of the meta effect. neither the OP or the answerer should be punished. They were not involved in any of this. Oct 13, 2015 at 18:01
  • 23
    Your Common Sense is rarely nice, but he is often right. The cause of the OP's problem may have been something different than in the linked dupe, but the question in question seems hardly worth reopening - it's a highly localized problem, it's sufficiently answered. Leave it closed.
    – Pekka
    Oct 13, 2015 at 18:05
  • 24
    But at the same time, this post should not be judged based on the OP's previous actions. This post should be judged based on its merits alone. @Jay
    – user4639281
    Oct 13, 2015 at 18:07
  • 5
    @TinyGiant Context matters though... If the real intent of this post was to generate a meta effect and publicly air an argument, rather than to honestly get feed back on the questions, the context certainly matters.
    – apaul
    Oct 13, 2015 at 18:11
  • 8
    If you have a problem with a user's actions that warrants a flag, flag it. Otherwise you can whine about it in chat, but starting an off-topic discussion about a user's past behavior in the comments section of a perfectly on-topic question is not the way to handle the situation.
    – user4639281
    Oct 13, 2015 at 18:12
  • 9
    The question has just been re-opened again. A temporary dupe-hammer ban might be in order..
    – AStopher
    Oct 13, 2015 at 18:45
  • 21
    Those who voted to close the question or who think the question should be closed might like to know that John Conde, who answered the question, has self-servingly decided to unilaterally reopen it. If this is not abuse of the close/reopen hammer, I don't know what is.
    – Louis
    Oct 13, 2015 at 18:46
  • 10
    @Louis Just got pointed in this direction. I went back to that question because I saw a lot of votes coming into my answer and thought it was odd (should have guessed meta effect). I saw the question was closed but didn't think it was a dupe of that question. If you and the community think I'm wrong that's ok. It can be still closed (and removed if so decided). I'm not married to the question or the answer. Life goes on.
    – John Conde
    Oct 13, 2015 at 18:49
  • 25
    I'm still curious.. why do you two think this isn't a duplicate? That's the root of the problem here, isn't it? It's been almost an hour and no one has given a reason for it to not be a dupe.
    – Kevin B
    Oct 13, 2015 at 18:50
  • 10
    It seems that it was re-opened both times as a direct result of this room: chat.stackoverflow.com/rooms/78119/…
    – AStopher
    Oct 13, 2015 at 18:55
  • 16
    @SmallLegend It's sad that you got caught in a broader dispute not of your own making. This should have been handled better. Hopefully you still hang around. There's normally not this much drama over a duplicate question.
    – Machavity Mod
    Oct 13, 2015 at 20:24
  • 7
    @Machavity "There's normally not this much drama over a duplicate question." Unless you meet YCS :-P ... Oct 13, 2015 at 20:46
  • 15
    There shouldn't be this much drama over a duplicate question no matter who is involved. Duplicate closure is a pretty straightforward thing, there was no reason for this much nonsense.
    – user4639281
    Oct 13, 2015 at 20:49

2 Answers 2

50

It appears that the question was reopened purely because a user with the Mjolnir saw that you had closed the question, and that user has a personal problem with you over unrelated incidents, rather than any meaningful disagreement over the close-state of that question.

The questions seem to be quite clearly duplicates, and nobody has provided any reasons for why they aren't duplicates, or for why the duplicate question doesn't solve the problem. The question has been closed once again, so that should be that.

24
  • 10
    I hope you don't mind the edit (too much). For once, I agree with YCS, in that the question should remain closed, but the speculation in this answer was just poor taste.
    – Cerbrus
    Oct 13, 2015 at 18:52
  • 30
    @Cerbrus It's not speculation. The user has posted now-deleted comments personally insulting YCS, and stating that he had closed the question because of his past actions. He has also refused to provide any reason for why the question isn't a duplicate. It's also relevant to the question. The question is "why was this reopened". Saying, "a user reopened it" isn't answering that question; it's a premise of the question.
    – Servy
    Oct 13, 2015 at 18:59
  • 6
    Just to let everyone know, the question in question has been deleted.
    – user4639281
    Oct 13, 2015 at 19:01
  • 3
    @Servy: Did the user re-opening the post Explicitly state he re-opened it because he disagrees with YCS? Why a user does something can only be answered by that user.
    – Cerbrus
    Oct 13, 2015 at 19:01
  • 12
    Actually you missed the deleted comments @Cerbrus. The user in question basically did say that, yes.
    – user4639281
    Oct 13, 2015 at 19:03
  • 20
    @Cerbrus there's a link to a chatroom where user says "I'll reopen it, just to show him"... so.... yeah, it is pretty much explicit. I've NEVER been a fan of YCS and I do think everything he posts on meta is poisonous... but I believed higher reps would know not to just do stuff like that "because"
    – Patrice
    Oct 13, 2015 at 19:04
  • 5
    I see, then my edit was out of place. I still think it's bad taste to defame a user in an answer, like this, but okay, it's based on actual events...
    – Cerbrus
    Oct 13, 2015 at 19:05
  • 5
    The user who reopened the question out of spite has ragequit SO... and good riddance, IMO.
    – Ian Kemp
    Oct 14, 2015 at 9:25
  • 3
    @Patrice well there's a vast group of users that either only care about reputation or about helping the asker of any question, rather than caring about SO's original mission statement of becoming the greatest programming knowledge base. I encounter this on a daily basis when researching not-so-obvious things about the abysmally documented ASP.NET MVC framework, for example. There's a handful of users active in that tag that only copy code from blog posts without showing explanation, attribution or notices of version-specific pitfalls, and there's thousands of such answers in that tag alone.
    – CodeCaster
    Oct 14, 2015 at 12:43
  • 7
    @CodeCaster I still believe there is a better way than simply posting the way he does and never answering anything. I'm with you a lot of the changes that should happen are pushed back "because" and that we need a cage rattler. But there's cage rattler and cage arsonist. A bit more diplomacy might go a long way here. I'm not saying it'll be easy, or quick. But the way YCS goes at it, it's just making things worse, as those people push back on him without even reading him anymore.
    – Patrice
    Oct 14, 2015 at 12:46
  • 3
    @Patrice I hardly think that how people have been automatically reacting to YCS can be blamed on YCS. He may or may not have said something that offended someone at some point and that should allow every other user to behave abhorrently? Every time he posts a question, whether legitimate and on-topic or not, the immediate response is for the normally somewhat well-behaved meta community at large to explode into a bunch of raving lunatics. That can in no way be blamed on YCS, that is each person's individual faults.
    – user4639281
    Oct 14, 2015 at 20:12
  • 3
    @TinyGiant I'm not trying to impart blame here. I'm just saying it like it is. YES those users on a vendetta should read each post without looking at the OP. But things being the way they are.... he tries to change things. He's going at it the wrong way, considering how it's currently not working. I'm not attacking him or saying he's in the wrong. I'm saying the way he went and the reaction he's getting NOW shows that this kind of behavior won't bring any benefit to meta.
    – Patrice
    Oct 14, 2015 at 20:17
  • 9
    @TinyGiant I know that I personally find that a very large portion of YCS's meta posts are either off topic, not constructively worded, or both, despite the fact that he's attempting to discuss problems with the site that I very much believe he's correctly identified. I would blame his poor presentation of his ideas as the reason that most people don't take him seriously and why he hasn't made progress at addressing the problem's he's bringing attention to. I don't think anyone here is suggesting that he's to blame for people improperly voting on questions on the main site to spite him.
    – Servy
    Oct 14, 2015 at 20:26
  • 5
    I feel like half the problem is simply a language problem. A lot of the points he makes are valid, and i agree with, but the presentation of it and grammar used are usually very blunt and direct, and people respond negatively to it. A developer i work with in europe comes across very blunt and direct too, and english also isn't his native language, so i wouldn't be surprised if that's what is happening here.
    – Kevin B
    Oct 15, 2015 at 20:59
  • 4
    @JayBlanchard And yet, even that, doesn't excuse reopening questions that he's closed, that merit closure, just to spite him. There's no real point in trying to create a list of things that YCS has done that you don't like, or that you think are wrong. None of them will ever justify such an action.
    – Servy
    Oct 16, 2015 at 13:42
-12

To set the record straight and for those who can't see the question because of low rep, here's the original question:

Trying to create an is_member function, to check whether the user is or is not a member.

Continually getting the same error despite doing as it says

  $mysqli = new mysqli($servername, $user, $password, $dbname); //used to connect to the database

  if ($mysqli->connect_error) {
       die('Error : ('. $mysqli->connect_errno .') '. $mysqli->connect_error);
  }

  // premium check function

  function is_premium(){
      $premium_query = mysqli_query($mysqli ,"SELECT 'is_member' FROM 'users' WHERE 'username' = '".$_SESSION['username']."' ");
      $premium = mysqli_result($premium_query, 0, 'is_member');
      if($premium =='1'){
          return true;
      }else{
          return false;
      }
  } 
  ?>

Pay particular attention to this bit:

SELECT 'is_member' FROM 'users' WHERE 'username'

Notice the quotes instead of ticks? I can't see why the question was closed with Warning: mysqli_query() expects parameter 1 to be mysqli, null given in

It had nothing to do with the problem. What he should have chosen as a duplicate question was When to use single quotes, double quotes, and backticks in MySQL

Prove me wrong.

My comment under the question stating that he chose the wrong question was removed and I have no idea why, which went along the lines of my telling him that he chose the wrong question to close it with.

It's pretty obvious that he downvoted perfectly good answers and closed some that I've answered to; I'm not the only one who has a problem with him, others do.

This is the classic the pot calling the kettle black.

There, I've said my piece and have "set the record straight". Now you know the "real" truth.

6
  • 22
    Hmya, you have to know by now that he will keep torturing and annoying you until you blow up and do something stoopid. And everybody will go "ohmigod, look at what Fred did!" And he'll go "hehehe". You'll have to out-smart him. Only way that works is by biting your tongue and wait until the moderators have had enough of him again. You can do it, hang in there. Oct 14, 2015 at 21:27
  • 11
    Are you just trolling now? Because that's not what your buddy's answer says. Also, the error being raised is a PHP error, not a MySQL error. The first parameter to mysqli_query isn't even that string.
    – cimmanon
    Oct 14, 2015 at 21:33
  • 7
    I mean, that's certainly one problem in the question, but it's not the main problem, it's something that will come up after the first problem is solved. I'd consider that to be a separate issue in need of a new question.
    – Kevin B
    Oct 15, 2015 at 20:38
  • 5
    So all your post is saying is "Let's blame this guy, not me.". Hmm..
    – AStopher
    Oct 15, 2015 at 20:42
  • 11
    I think that really this is indicative of "your" truth, not necessarily the "real" truth. Whether YCS was wrong or not, you were well out of line with your responses. Saying someone else is behaving badly while behaving badly yourself is most definitely a case of "the pot calling the kettle black", but on your part rather than anyone else's.
    – user4639281
    Oct 15, 2015 at 20:47
  • Let it go already, you'll feel a lot better about it too ;-) Oct 16, 2015 at 17:47

You must log in to answer this question.

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