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

  • Home
  • SEARCH
  • 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 986121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:16:10+00:00 2026-05-16T05:16:10+00:00

I am currently tasked with porting our website code onto a linux server (from

  • 0

I am currently tasked with porting our website code onto a linux server (from Win2003). The websites run on a SQL Server database. The original dev created a wrapper to contain all interaction with the database including selecting the correct database (the application spans multiple databases)
The problem code is as follows…

if (strcmp($this->_DB_Connection, $param_Database) <> 0) {
  $this->_DB_Selected = @mssql_select_db($param_Database, $this->_DB_Connection);
}

Where $this->_DB_Connection is the connection to the DB server and $param_Database is the name of the database required for the next query.

The problem is that on Windows, strcmp returns 1, on linux it returns NULL.

Anyone have a work around for this that doesn’t involve selecting the database each time.

  • 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-16T05:16:11+00:00Added an answer on May 16, 2026 at 5:16 am

    I’ve ended up just storing the name of the last selected database in a member variable of the DB wrapper object and am comparing that instead of the SQL connection

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

Sidebar

Ask A Question

Stats

  • Questions 491k
  • Answers 491k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You're on the right track. Consider creating a new method… May 16, 2026 at 10:07 am
  • Editorial Team
    Editorial Team added an answer You can give them a common class, like this: <fieldset… May 16, 2026 at 10:07 am
  • Editorial Team
    Editorial Team added an answer Only way to gain access is to jailbreak your iphone.… May 16, 2026 at 10:07 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm currently tasked with replacing an Apache + Resin Java web server with a
I'm currently tasked with setting up a TFS server for a client. The TFS
Currently I'm tasked with doing the daily build. We have an ASP.NET 2005 website
Currently tasked with migrating Informix ESQLC files to Oracle Pro*C and have a few
I'm currently tasked with teaching all the developers, in the company I work in,
I'm currently tasked with reading some data that stored in a flat file into
I'm writing a client-server application to be used in a computer lab and act
I've been tasked with adding a modal based UI feature to an internal application.
OK so I've been tasked with upgrading an application which involves updating schema in
Currently I have a service that uses a UserNamePasswordValidator to authenticate the client user.

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.