1

So i am trying to get a row from a table in the database every 10 min and delete the row after 10 min and then get a new one and so on! How can i make it do it? i have searched alot but i always get very confused so can someone make a script for me then break it up so i understand?(i am a very bad learner sorry!)Here is my db connect file in case it helps!

            <?php

        // connecta hemsidan med databasen
        $link = mysql_connect('links-218658.mysql.binero.se', '', '');
        if (!$link) {
            die('Not connected : ' . mysql_error());
        }

        // välja databas här!
        $db_selected = mysql_select_db('218658-links', $link);
        if (!$db_selected) {
            die ('Can\'t use foo : ' . mysql_error());
        }

        ?>
Aady Ahmed
  • 33
  • 7
  • 3
    You should create a cron job that calls your script every ten minutes. If you haven't heard of it, cron is a linux utility that allows one to schedule scripts to run automatically or, using incron, based on events (e.g. when a file is deposited in a directory). – Craig Sep 10 '16 at 19:50
  • never heard of it but thanks i will look it up! – Aady Ahmed Sep 10 '16 at 20:52

0 Answers0