I need to insert some records in a database that's located in a MSSQL SERVER 7.0, but everytime I try to make an insert in the database the code doesn't work, here's my code.
The file where the db conecction is configured is the following:
Code: Select all
<?
//db_config.inc.php
$servidor = "172.17.1.67";
$usuario = "sa";
$senha = "sig2";
$banco = "Cortes";
$conex = mssql_connect ($servidor,$usuario,$senha);
mssql_select_db ($banco, $conex);
?>Code: Select all
<?
include "db_config.inc.php";
$sp = "insert into Fechas_cortes values ('2005-10-14')";
$a = mssql_query($sp,$conex);
?>Can anybody help? I can't migrate to a newer version of MSSQL SERVER b/c my app it's a secondary and I really need to make it work in that version.
Hope anyone can help.