title: Running a PHP script containing MySQL Queries in background with out using cronjobs
body: <p>I have a php script as "save.php" which contains sql queries, and need to run this script in the background i.e., not in the browser. For calling this script I am using the exec() command in file named "trigger.php". </p>
  
  <p>now when <code>save.php</code> is called by <code>exec()</code> it runs normal when the mysql queries are not used., but when I put the mysql queries the queries alone doesn't work and rest of the script executes fine. As far as I am thinking the mysql_connect is not able to run.  </p>
  
  <p>I cannot use cronjob because my need is different, I use need to trigger the script and it should be running continuously, but not in intervals.</p>
  
  <p>So, is there a way where I can create a MySqL Server connection in the file which needs to be running in the background? </p>