Hi all,
Why do I get the error message for the below query? On MS SQL Server.
$query = "SELECT * ". "FROM issues i ". "INNER JOIN ". "platform p ". "ON i.platform_ID = p.platform_ID ". "WHERE fund_number = '$fund_num'"; echo $query; $result = mssql_query($query) or die('Select Error');
Thanks.
what is this i?
Table alias. Save having to write "issues" all the time.
What does [man]mssql_get_last_message[/man] contain? (Don't ask me, I've never had to use it - I just found it by scrolling through the MSSQL functions listed in the manual and it looked like a promising thing to try out.)
Tried this but mssql_get_last_message didnt return anything...
$query = "SELECT * ". "FROM issues i ". "INNER JOIN ". "platform p ". "ON i.platform_ID = p.platform_ID ". "WHERE fund_number = '$fund_num'"; echo $query; $result = mssql_query($query); print "MSSQL Query failed: " . mssql_get_last_message() . "<br />\n";
Forgot to connect to database!!!! :o
The thing with using SQL Server is I am unable to get error messages like with MySQL's or die(mysql_error())
if (!$dbconn) { echo "Sugar, didn't connect to the database"; }
and
if (!$result) { echo "Sugar, query didn't run"; }
are helpful with MS SQL 2000.
Blu