php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26296 Warning: mssql_query(): message: Invalid object name
Submitted: 2003-11-18 01:48 UTC Modified: 2003-11-18 05:07 UTC
From: ameen at whitehouseit dot com Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 4.3.4 OS: Windows 2000 Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ameen at whitehouseit dot com
New email:
PHP Version: OS:

 

 [2003-11-18 01:48 UTC] ameen at whitehouseit dot com
Description:
------------
Just i try to connect my database in SQL Server and fetch some records from the database. But it shows warning message like this.

Warning: mssql_query(): message: Invalid object name 'mytable'. (severity 16) in D:\abc\Conn.php on line 21

Warning: mssql_query(): Query failed in D:\abc\Conn.php on line 21

How to rectify? i'm sure tables exists in my db. and also connection establishes perfectly.

Reproduce code:
---------------
	$i=mssql_connect("localhost","uid","pwd")  or die("unable to Connect");
	if (mssql_select_db("mydb",$i)==true)
		echo "DB Exists";
	else
		echo "DB Not Exists";
	
	$sql="select * from mytable where login_id='myname'";

	$rs=mssql_query($sql,$i);

Expected result:
----------------
Warning: mssql_query(): message: Invalid object name 'mytable'. (severity 16) in D:\abc\Conn.php on line 21

Warning: mssql_query(): Query failed in D:\abc\Conn.php on line 21


Actual result:
--------------
Fetch Records from db

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-18 05:07 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 05:01:33 2024 UTC