Probably simple PHP & MSSQL query problem
Posted: Thu Sep 15, 2005 3:59 pm
Hi all, im a bit of a noob at PHP used to do a lot of ASP. I was wondering if anyone could help solve a problem thats plaugeing me:
This executes and leaves me with "ERROR" printed mindlessly without any explanation. I know there is a (or die(mysql_error())) but i can't seem to find one for mssql to give me an accurate idea of whats gone wrong.
All help in this matter is greatly appreciated!!
Thanks
Dan
PS i've removed the hostname and password, these have been checked multiple times and work when used to execute other queries. This seems to be the only one that crashes!
Code: Select all
$conn = mssql_connect("myhost.com","xyligosw","*****") or die("ERROR: Could not connect to DB!");
mssql_select_db("xyligo_com",$conn) or die("ERROR: Could Not select Tables!");
$sql = "SELECT * FROM news";
echo $conn;
echo "<br>";
echo $sql;
$t = mssql_query($sql,$conn) or die("<br>ERROR");All help in this matter is greatly appreciated!!
Thanks
Dan
PS i've removed the hostname and password, these have been checked multiple times and work when used to execute other queries. This seems to be the only one that crashes!