Insert Query Not working
Hi i have a small query which takes data from one mysql database and inserts it into a duplicate table, the problem is i get the relevant data out of the database fine, but i can not seem to get it in to the new database, i have error reporting enabled, but i am not getting any errors.

Below is my code:

    $dbhost							= "";
    $dbuser							= "";
    $dbpass							= "";
    $dbname							= "";
    $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ("Error connecting to  database");
    mysql_select_db($dbname);
    $result = mysql_query("SELECT * FROM ip_stats WHERE DATE(date) = CURDATE()") 
    or die(mysql_error());  
    // keeps getting the next row until there are no more to get
    while($row = mysql_fetch_array( $result )) {
    $id   = $row['id'];
    $date   = $row['date'];
    $ip   = $row['ip'];
    $hostname   = $row['hostname'];
    $company_name   = $row['company_name'];
    $address   = $row['address'];
    $descr   = $row['descr'];
    echo "$id - $date - $ip - $hostname - $company_name - $address - $descr"; ?><br /><?php
          $query = "INSERT INTO `ip_stats11` (`id`, `ip`, `date`, `hostname`, `company_name`, `address`, `descr`, `updated`)
		  VALUES ('$id', '$ip', '$date', '$hostname', '$company_name', '$address', '$descr', 'yes')";
          echo "updated $ip"; ?><br /><?php
    }
Insert Query Not working
===

Hi i have a small query which takes data from one mysql database and inserts it into a duplicate table, the problem is i get the relevant data out of the database fine, but i can not seem to get it in to the new database, i have error reporting enabled, but i am not getting any errors.

Below is my code:

    $dbhost							= "";
    $dbuser							= "";
    $dbpass							= "";
    $dbname							= "";
    $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ("Error connecting to  database");
    mysql_select_db($dbname);
    $result = mysql_query("SELECT * FROM ip_stats WHERE DATE(date) = CURDATE()") 
    or die(mysql_error());  
    // keeps getting the next row until there are no more to get
    while($row = mysql_fetch_array( $result )) {
    $id   = $row['id'];
    $date   = $row['date'];
    $ip   = $row['ip'];
    $hostname   = $row['hostname'];
    $company_name   = $row['company_name'];
    $address   = $row['address'];
    $descr   = $row['descr'];
    echo "$id - $date - $ip - $hostname - $company_name - $address - $descr"; ?><br /><?php
          $query = "INSERT INTO `ip_stats11` (`id`, `ip`, `date`, `hostname`, `company_name`, `address`, `descr`, `updated`)
		  VALUES ('$id', '$ip', '$date', '$hostname', '$company_name', '$address', '$descr', 'yes')";
          echo "updated $ip"; ?><br /><?php
    }