We can't read your mind.

What kind of error do you get?

Second, I recommend that you ALWAYS add the die() clause to your mysql
function calls

-----Original Message-----
From: Manu Verhaegen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 20, 2002 7:16 AM
To: 'Php-General (E-mail)
Subject: [PHP] edit record in mysql and receive error


Hi,
I have the following records in my table dnsDNS
Record 1 :
        Login = company1
        ip = 10.123.100.111
Record 2 :
        Login = company2
        ip = 10.123.101.111

I want to update recordnumber 1
I receive error

<?php
  $ip="10.10.9.100";
  $company="company1";  
  $host="localhost";
  $user="username";
  $password="abcdef";
  $database="database1";
  $query = "update dynDNS SET IP='$ip' where Login='$company'";         
  mysql_connect ($host, $user, $password);
  mysql_select_db($database);
  $result=mysql_query($query);
  if ($result == 0) {
    echo("error");
    echo("<BR>");
  }
?>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to