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 8707793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:57:23+00:00 2026-06-13T03:57:23+00:00

I have a short PHP script that interacts with a database. The script is

  • 0

I have a short PHP script that interacts with a database. The script is currently written for MySQL but needs to be converted to SQL Server. I don’t have experience with SQL Server and think I have done most of it correctly but in one line of the script is:

@mysql_fetch_assoc($result)

What is the SQL Server equivalent of this?

Do I need to edit the query line at all?

$query = 'SELECT * FROM location WHERE dType="' . $ajax_var . '" AND oType="' . $ajax_var2 . '"';
  • 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-06-13T03:57:24+00:00Added an answer on June 13, 2026 at 3:57 am

    mysql_fetch_assoc returns an associative array of column names mapped to their respective value, row-by-row. For SQL Server you want sqlsrv_fetch_array

    Don’t be afraid of reading the docs. 😉

    Cheers

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

Sidebar

Related Questions

I have a small Java method that inserts short messages to a MySQL Database.
I have to adapt a PHP-script that is connected to a extremely messy database-design.
I have a very painful slow script that gets lots of data from MySQL
I have a PHP script that runs a SELECT query then immediately deletes the
I have a PHP script that attempts to read and parse JSON strings returned
I have made a jQuery script that loads items from the database when the
I have a php script that is reading a remote CSV file, and adding
I have found an open source PHP script that uses a select menu to
I have a PHP script ( script A ) that makes a query to
I have a short script that posts a serialized list. It's working in firefox,

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.