Why do bind and mysqli_query show different types of data?
<p>I'm trying to fetch some data from a table using <strong>mysql bind</strong> concept. The queries work but I don't get the expected results. Here's what I've tried and observed: </p>

<pre><code>&lt;?php
$conn = mysqli_connect("localhost", "root", "", "testdb");

//USING BIND
/*$query= mysqli_prepare($conn, "SELECT * FROM car WHERE id=1");
mysqli_stmt_execute($query);
$result=mysqli_stmt_get_result($query);
while($row=mysqli_fetch_assoc($result)){
    $rows[]=$row;
}
echo json_encode(array("fileds"=&gt;$rows));*/

//NORMAL WAY
$query="SELECT * FROM car WHERE id=1";
$queryrun=mysqli_query($conn, $query);
while($row=mysqli_fetch_assoc($queryrun)){
    $rows[]=$row;
}
echo json_encode(array("fileds"=&gt;$rows));
?&gt;
</code></pre>

<p>The results are:</p>

<p>Bind: </p>

<pre><code>{"fileds":[{"id":1,"Name":"dfgdf","Brand":"dfgd","Model":"dfg","driver_id":1,"bools":1}]}
</code></pre>

<p>Normal: </p>

<pre><code>{"fileds":[{"id":"1","Name":"dfgdf","Brand":"dfgd","Model":"dfg","driver_id":"1","bools":"1"}]}
</code></pre>

<p>So, as you can see, the <strong>bools</strong> key has output <strong>1</strong> and <strong>"1"</strong> respectively. But I want only the <strong>2nd</strong> one, that is string, USING <strong>BIND</strong>.</p>

<p>Is there any way to fix? Or am I doing something wrong?</p>

<p>[The data type of <strong>bools</strong> is INT]</p>