executing mssql query
Posted: Thu Jun 16, 2005 2:22 am
Everytime i execute a query using mssql_query, I get an error saying "Changed database context at XXX". here's the code:
Can anyone tell me what's wrong with my code or the server itself?
Code: Select all
mssql_connect($server_name,'sa','');
mssql_select_db($db_name);
$query = "SELECT * FROM $table_name WHERE refno=$sel_refno");
$result = mssql_query($query);
if($result){
// do stuff ...
}else{
die(mssql_get_last_message());
}
mssql_close();