<?
$sql.="if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pf_configuracion]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)\n";
$sql.="drop table [dbo].[pf_configuracion]\n";

ejecutarsql($sql,$filas,$otro);
$sql="";

$sql.="if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pf_configuracion]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)\n";
$sql.=" BEGIN\n";
$sql.="CREATE TABLE [dbo].[pf_configuracion] (\n";
$sql.="	[id_configuracion] [nvarchar] (50) COLLATE Modern_Spanish_CI_AI NOT NULL ,\n";
$sql.="	[valor] [nvarchar] (50) COLLATE Modern_Spanish_CI_AI NULL ,\n";
$sql.="	 PRIMARY KEY  CLUSTERED \n";
$sql.="	(\n";
$sql.="		[id_configuracion]\n";
$sql.="	)  ON [PRIMARY] \n";
$sql.=") ON [PRIMARY]\n";
$sql.="END\n";

ejecutarsql($sql,$filas,$otro);
$sql="";


$sql.="insert into [dbo].[pf_configuracion]([id_configuracion],[valor]) values (N'nombre_planta',N'Unifruti');\n";
$sql.="insert into [dbo].[pf_configuracion]([id_configuracion],[valor]) values (N'nombre_planta2',N'El Canelo');\n";

ejecutarsql($sql,$filas,$otro);
$sql="";

?>