The following alternative functions exist in MSSQL:
mysql_query ---> mssql_query mysql_num_rows ---> mssql_num_rows mysql_fetch_array ---> mssql_fetch_array
Take a look at the official documentation here for more information ...
The only missing function is the escape line ( mysql_real_escape_string ), for this purpose you can define yourself as a function:
function mssql_escape($str) { if(get_magic_quotes_gpc()) { $str= stripslashes($str); } return str_replace("'", "''", $str); }
source share