php mysql_query ekleme sonra hiçbir şey döndürür (ve hiçbir şey ya da eklenir)

0 Cevap php

Ben aşağıdaki kodu var:

    <?php
  if(!empty($error_msg))
   print("$error_msg"); 
  else
  { 
   require_once("../include/db.php");

   $link = mysql_connect($host,$user,$pass);
   if (!$link) 
    print('Could not connect: ' . mysql_error());
   else
   {      
    $sql = "insert into languages    values(NULL,'$_POST[language]','$_POST[country_code]');";
    $res = mysql_query($sql);

    print("$sql<br>\n");
    print_r("RES: $res");
    mysql_close($link);
   }
  }
 ?>

In one word: it does not work. mysql_query doesn't return anything. If I try the same query within php_myadmin, it works. It does not insert anything either. Also tried it as user root, nothing either. Never had this before. Using mysql 5.1 and PHP 5.2.

Herhangi bir fikir?

0 Cevap