Page 1 of 1

MsSQL / PHP Problem

Posted: Fri Nov 13, 2009 7:02 am
by phillbooth
Hi there,

I have MsSQL running on a php file, for some weird reason I just cant seem to connect to the table called Properties, though using exactly the same code I can connect to any other table in the database. Please help!

Code: Select all

mssql_connect($host_featured_property, $username_featured_property, $password_featured_property);
 
mssql_select_db($db1);
 
$result1 = mssql_query("SELECT * FROM Properties"); <-- code breaks here
 
while ( $record1 = mssql_fetch_array($result1) )
{
$featured_property = $record1["PropertyID"];
echo $featured_property; 
}
I have sat down with my manager and we both agree its the table not the code does anyone have any insite?

Re: MsSQL / PHP Problem

Posted: Fri Nov 13, 2009 7:15 am
by papa
Sounds like the table yes.

Any difference between the tables except for columns?

Re: MsSQL / PHP Problem

Posted: Fri Nov 13, 2009 7:25 am
by phillbooth
Actualy, your question gave me an idea... I changed the * for the columns required and it worked! Strange hu!

Re: MsSQL / PHP Problem

Posted: Fri Nov 13, 2009 7:34 am
by papa
Nice :D