table exist in the database, but cannot be seen
-
Saturday, August 30, 2008 9:13 AM
after connecting to my database using mysql_connect() ;(i am using php) and then select
the database mysql_select_db("database_name"); after executing the query using mySql_query($qry); ($qry=
"INSERT INTO $table...) returns: database_name.$table doesn't exist. but the table exist in the database.
in the database i have 20 tables, it doesn't work on 4 of them and for the other it works properly.please if anyone can help me thankyou.
All Replies
-
Saturday, August 30, 2008 7:12 PM
Based on the code you described in your post, it looks like you're using the MySQL Driver for PHP. This is a forum for the SQL Server Driver for PHP. Going to the forums on the MySQL site is probably your best bet for getting help on this issue.
David Sceppa
Program Manager - Microsoft SQL Server Driver for PHP -
Monday, September 01, 2008 5:36 AM
Hi, thanks a lot for your interest..but i'am using SQL server.
so from php i connect to Microsoft SQL server.
thanks
-
Tuesday, September 02, 2008 4:03 PM
Suzi,
I'm not sure what to say. The code snippet you included in your initial post calls the MySQL driver.
The one suggestion I could offer is to compare how you're logging into the database in your PHP application to how you're logging in to see the four tables that aren't accessible from the PHP application. That might provide a clue.
David Sceppa
Program Manager - Microsoft SQL Server Driver for PHP -
Wednesday, September 03, 2008 6:52 AM
Hi,
to see the tables from Microsoft SQL server, I open the microsoft SQL server --> SQL server group --> (local) --> databases, and i open my database, it contains 28 database, 4 of them are not accessible..and theses 4 where created together after the 24 tables ( 4 months after).
from php i'm logging through
mysql_connect('localhost', 'mysql_user', 'mysql_password');
mysql_select_db ("databasename");
on server it works well, but on my PC where i'am working offline it gives me this problem.
I tried to delete the database, and re-create it, then register it in the ODBC, and then copy the data i bring from the server ( data file and transaction log file).. but the problem still the same.
hope i'am not bothering you..thank you for you help and attention
-
Wednesday, September 03, 2008 8:38 AM
hi
there is another thing that when i re-create the database i entered a collation name, then after when going to properties of the database the collation name doesn't appear.
-
Wednesday, September 03, 2008 8:54 AM
hi,
it works for the collation name
-
Wednesday, September 03, 2008 12:25 PM
Hi Mr. David..
it works now, there was a problem between sql and mysql
thanks a lot for your help and your interesr
-
Wednesday, September 03, 2008 7:09 PM
Suzi,
I'm glad to hear that things are working correctly now. Thanks for letting us know.
David Sceppa
Program Manager - Microsoft SQL Server Driver for PHP -
Tuesday, October 07, 2008 9:55 PMDavid: how are you?
We are having a situation that your help might be great. We are developing a site hosted on a Unix server and MySQL for database.
We need to make a remote connection from the site on the Unix server to an SQL Server 2005 database just to read information and display it back to the browser by using PHP for the application programming.
We are trying to make the remote connection with the PHP function "mssql_connect" but We're getting the following error:
Fatal error: Call to undefined function mssql_connect() in /home/lyaibero/public_html/aerocav/Class/Lib.php on line 11
Now the code We're using the make the remote connection:
<?php
$myServer = "clientserver.com";
$myUser = "dbuser";
$myPass = "userpass";
$myDB = "dbname";
// connection to the database
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
// select a database to work with
$selected = mssql_select_db($myDB, $dbhandle)
or die("Couldn't open database $myDB");
echo "You are connected to the " . $myDB . " database on the " . $myServer . ".";
// close the connection
mssql_close($dbhandle);
?>
We have found a lot of suggestions to solve the situation, but honestly, now that I found this forum and your presence, I'd rather to start over by following your suggestions.
Could you please give us a hand on this matter? We will appretiate any help.
Thanks a lot in advanced
Jose M

