|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-11-18 05:07 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
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