0

I know most of the time this error means that you made a typo in your query but I cant seem to find anything wrong. When I run this query in phpmyadmin(with the variable of course replace by input), the results will show up.

So this is the code:

<?php
$mysqli= new mysqli('localhost','root','','something');
$query= $mysqli->prepare("select name,number,email,token from personen where token=?");
$query->bind_param("s",$token);
$query->execute();
?>

This error means my $query returns false right? I've checked everything myself on typos and I cant find a typo 100% sure. Is there anyway to find my mistake in this error?

Loko
  • 6,539
  • 14
  • 50
  • 78
  • `$token` which is unknownst to us could be the culprit. Compare it with what `var_dump($token);` produces against its value in the database. The link with which the question was closed with contains everything you need to use to debug. – Funk Forty Niner Oct 30 '16 at 19:43
  • @Fred-ii- yeah okay so I found out that I couldn't run 2 queries at the same time without store_result() or something. Anyway it's fixed now. – Loko Oct 30 '16 at 19:46
  • I'm glad to hear that you resolved it, but what you posted didn't support the question. Had you done that, then the outcome would have been different and the question wouldn't have been closed. – Funk Forty Niner Oct 30 '16 at 19:58
  • @Fred-ii- Yeah sorry I just had no clue what was wrong at the moment I made the question. – Loko Oct 30 '16 at 19:59
  • No problemo, *cheers* – Funk Forty Niner Oct 30 '16 at 20:00

0 Answers0