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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:29:37+00:00 2026-06-06T00:29:37+00:00

A query I wrote in PHP for a SQL Server database is having an

  • 0

A query I wrote in PHP for a SQL Server database is having an issue where a word is not being recognized as the table name. I’m using SQL Server for PHP 2.0 (VC6). The following query works and returns all orders from the table Order when executed in SQL Server Management Studio.

SELECT * FROM "db_name"."dbo"."Order" (also tried using brakets [] around table name)

In PHP, I get the following error:

[0] => Array
    (
        [0] => IMSSP
        [SQLSTATE] => IMSSP
        [1] => -35
        [code] => -35
        [2] => Invalid type
        [message] => Invalid type
    )

This query works within the PHP code for all other tables in the database, db_name.. it just won’t work for table Order, and that is the correct table name. I tried double quote, rectangular brackets, no quote/bracket, etc. to to no avail. Does anyone have an idea how to fix this?

** UPDATE:

I found a solution to this. Please take a look at one of the answers for the fix or work-around.

  • 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-06T00:29:39+00:00Added an answer on June 6, 2026 at 12:29 am

    Something must be going on in PHP or your driver. You should be able to use the SQL Server Profiler to see the actual query being submitted.

    In any case, if you can’t find out what it’s doing. You could consider this as a workaround:

    CREATE VIEW dbo.MyOrder
    AS
    SELECT * FROM [Order]
    

    And move on – life’s too short.

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

Sidebar

Related Questions

I'm having an issue with a query I wrote where for some reason the
I need to add new records to my SQL database using C# and php.
Environment: - PHP 5.3.5 - Oracle 11g database Table Name: tips_categories id category picture
I want to know is this practically possible in sql(using php as server-side), where
SOLVED: I wrote and tested a PHP script on the local server. (Nothing fancy,
Consider the database table: folders folders id parent_id name 1 0 a 2 1
I have a database in a state own ms sql server. Writing user information
My php script downloads files from a remote server using cURL. I wanted to
Below is part of a PHP database class someone else wrote, I have removed
I'm trying to create a simple poll function using php and sql. I have

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.