Need your help please got problems with MSSQL

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Patrick Braun
Forum Newbie
Posts: 1
Joined: Tue Oct 01, 2002 2:00 am

Need your help please got problems with MSSQL

Post by Patrick Braun »

Hi,
i got the following problem, i coded a small database programm in Mysql who can the user insert some infos over a intranetsite.. so long.. its done.. but the problem is, in mysql it woks all fine.. but now i want to use this programm on MS SQL ..ok not a problem.. i changed some definitions and now the code is
<?php

require("config.php");
#echo $sqlst;
$connect = mssql_connect($dbhost, $dbuser, $dbpass);
if(!$connect)
{
print "SORRY, db down...<br>";
die();
} else {
mssql_select_db("$dbname",$connect);
}


echo $sqlst = "INSERT INTO domain (domainID, name, description, server, responsibleID, port) VALUES ('$domainID', '$name', '$description', '$server', '$responsibleID', '$port')";
echo $eintrag = mssql_query($sqlst, $connect);
if(!$eintrag)
{
print "<p>db not working!";
} else {
print "<p>Done accpeted querry!";
}

?>

so this is the code i cant find a failure, the problem is he makes the row in the database but its empty.. so is the rows ans cells empty but created.. if i put some data manually in the DB with MS enterprise manager and wanna see it works .. pls help me is anyting false with my code??
thx regards
Patrick B
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

but your echo-output looks fine?
Post Reply