Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6542033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:10:37+00:00 2026-05-25T11:10:37+00:00

I have a routine that I call to do a mssql and mysql server

  • 0

I have a routine that I call to do a mssql and mysql server connect like so:

$mysql_aoi_conn = DoMySQLConnect( 'AOI' );  
$mssql_aoi_conn = DoMsSQLConnect( 'itf' );

the functions are as follows:

function DoMySQLConnect( $pdb_name ){
    $mysql_conn = mysql_connect('localhost', '####', '####') or die( 'could not connect to localhost server : ' . mysql_error() );
    $mysqldb_conn = mysql_select_db( $pdb_name, $mysql_conn ) or die('could not use database ' . $pdb_name . ' : ' . mysql_error() );   
    return array("database" => $mysqldb_conn, "connection" => $mysql_conn );
};
function DoMsSQLConnect( $pdb_name ){
    $mssql_conn = mssql_connect("128.251.xxx.xxx", '###', '###') or die("failed to connect to server USLONSAPP003");
    $mssqldb_conn = mssql_select_db( $pdb_name, $mssql_conn) or die("failed to select database " . $pdb_name);
    return array("database" => $mssqldb_conn, "connection" => $mssql_conn );
};

I’m trying to use the connection implementation within the mssql_query and mysql_query to tell my queries which connection to use but I’m getting an error. Here is one of my queries:

$login_res = mssql_query("SELECT *
                          FROM ITF_USER
                          WHERE ITF_LOGIN = '" . $lcUserName . "'", $mssql_aoi_conn['connection'] )
                          or die("failed to query ITF_USER: \n" . mssql_get_last_message() );

This dies with the mssql_get_last_message() of:
Changed database context to 'itf'. which is not really an error. Can someone tell me if I’m utilizing this query option wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:10:38+00:00Added an answer on May 25, 2026 at 11:10 am

    After some research it seems that mssql_query() doesn’t support the link_identifier option and therefore breaks (albeit without a valid error for debugging). Removing the link identifier for the mssql_query and keeping it throughout my document for any mysql_query() lets me use both mssql_query() and mysql_query() commands throughout my script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pointer to a struct. I call a routine that determines whether
I have a utility routine that I call when validating user input in a
I have a PHP routine that I call shell_exec to traverse my own website
I have this routine that calculates the seconds-to-date for a struct tm . On
I have a routine that examines thousands of records looking for discrepancies. This can
I have a routine that dynamically changes a select list's selected option when the
I have a little routine that's run under Linux and Windows written in C
I have a javascript routine that is performing actions on a group of checkboxes,
Is there a way to access (and call) procedures like _CopyArray that are defined
I have some C++ Win32 code that I want to call from Ruby. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.