update or insert commands

admin

Administrator
Staff member
Hi,

I am using mysql_1.3.19 and PHP4. When I tried to update database using following codes

// Connect to the Database

$link = mysql_pconnect("$hostName", $userName, $password) or die
("Couldnt connect database");

// Select the Database
mysql_select_db("$databaseName", $link) or die ("Couldn't find database");

// Execute the Statement

$sql = "UPDATE Feature SET Name1='$Name1', Name2='$Name2 ', Name3 ='$Name3 ' where ID='$ID';

$result = safe_query ($sql, $link);

but those columns couldn't be updated when I went back database to check. However, I don't have any problems to select any data from that database.

Do you have any suggestions?
 
Back
Top