title: "Execute Array" problem from Database PHP
body: <p>As I'm a beginner, I have a problem with executing an array from the database.</p>
  <p>My code:</p>
  <pre><code>    $operation_id = (int)$_GET[&quot;operation&quot;];
  $operation_query = $db_link-&gt;prepare('SELECT * FROM `shop_users_accounting` WHERE `id` = ? AND `active` = 0 AND `user_id` = ?;');
  $operation_query-&gt;execute( array($operation_id, $user_id) );
  $operation = $operation_query-&gt;fetch();
  if($operation == false)
  {
      $answer = array();
      $answer[&quot;result&quot;] = false;
      $answer[&quot;code&quot;] = 2;
      exit(json_encode($answer));
  }
  </code></pre>
  <p>For now, I can echo <code>$operation_id</code> and <code>$user_id</code> without any problem</p>
  <p>but in <code>shop_users_accounting</code> table I have more columns, like <code>pay_orders</code> and <code>amount</code></p>
  <p>I have tried do like this <code>$operation_query-&gt;execute( array($operation_id, $user_id, $pay_orders) );</code> but then IF function get executed and I get false</p>
  <p>I have tried <code>$operation_query = $db_link-&gt;prepare('SELECT * FROM `shop_users_accounting` WHERE `id` = ? AND `active` = 0 AND `user_id` = ? AND `pay_orders` = ?;');</code> and the result is the same, IF function get executed and I get false</p>
  <p>The question is, what I'm doing wrong, and how I can get <code>pay_orders</code> and <code>amount</code> from DB without getting False</p>
  <p>Resolved by myself</p>
  <p>Thank you</p>