insert in mysql
| From: | Robert | Date: | Thu, 25 Jan 2001 20:19:03 +0000 |
| Subject: | insert in mysql | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-6186@lists.php.net to get a copy of this message | ||
Guess this would be more info
// ------------ Connect to Database ---------------------------------------
$db = mysql_pconnect("tech2000", "wwwguest", "guest");
if(!$db){echo("Unable to connect to database server.");exit();}
if(! @mysql_select_db("bruininv")){echo("Unable to select
database.");mysql_close($db);exit();}
//--------------------------- Add part ----------------------------------
if($act=="ADD"){
$sql="INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp')";
if(! @mysql_db_query("$sql")){echo("Unable to add
part.");mysql_close($db);exit();}
}