title: Mysql - Pdo: getting the id for data selection - from another php file
body: <p>I have a couple of nearly identical  files in a large number of folders.</p>
  
  <p>The <strong>difference is the id</strong> set in every folder/file.</p>
  
  <p>I would love to <strong>put 1 file in each folder</strong> with the corresponding id of that folder/customer.
  All files in that folder would include/import/ that number/file
   AND
  all datas would be changed with little effort...</p>
  
  <p>Is that possible?</p>
  
  <p>lets say i put a .php file in each folder with just the id number of that customer. 
  All file would somehow import that number or file...</p>
  
  <p><strong>AT the moment i use that in every file:</strong></p>
  
  <pre><code>&lt;?php require_once('../connections/connect.php'); ?&gt;
  &lt;?php
  $sql = "SELECT * FROM my_table_A where id = 1";
  foreach ($pdo-&gt;query($sql) as $row_Recordset1)
  ?&gt;
  </code></pre>
  
  <p>Is there a better way?</p>