Should I bind internal values when preparing queries in PDO?
<p>Having the following code</p>

<pre><code>&lt;?php
$age = get_age(); // a generated or random unsigned integer
$db-&gt;prepare("SELECT * FROM Customers WHERE name = :name AND age = :age");
$db-&gt;bindValue('name', $_POST['name']);
$db-&gt;bindValue('age',  $age, PDO::PARAM_INT);
$db-&gt;execute();
</code></pre>

<p><strong>Should I bind 'age' even if it doesn't come from the user (i.e outside)?</strong></p>

<p>If I have a fixed age or it's somehow generated by me, should I just do this?</p>

<pre><code>&lt;?php
$age = get_age(); // &lt;- Of course I made sure this is an unsigned integer
$db-&gt;prepare("SELECT * FROM Customers WHERE name = :name AND age = $age");
$db-&gt;bindValue('name', $_POST['name']);
$db-&gt;execute();
</code></pre>

<p>Are there pros and cons for each or is it just personal preference?</p>