Brian W Posted September 25, 2008 Share Posted September 25, 2008 I don't how or even if it is possible to connect to a SQL server (not MySQL). Does someone have a template I can use? Also, this may be a breaker, I also have no clue if you are able to connect to a DB not local. What I have is the servers IP. Thanks. Link to comment https://forums.phpfreaks.com/topic/125851-solved-connect-to-sql/ Share on other sites More sharing options...
haddydaddy Posted September 25, 2008 Share Posted September 25, 2008 Of course you can, http://www.php.net/manual/en/function.mssql-connect.php Link to comment https://forums.phpfreaks.com/topic/125851-solved-connect-to-sql/#findComment-650775 Share on other sites More sharing options...
trq Posted September 25, 2008 Share Posted September 25, 2008 Sql is a query language, you'll need to give us more details of what database exactly your talking about. Link to comment https://forums.phpfreaks.com/topic/125851-solved-connect-to-sql/#findComment-650781 Share on other sites More sharing options...
Brian W Posted September 25, 2008 Author Share Posted September 25, 2008 Thank you for the link to that section of the manual...I couldn't seem to find any documentation that was relative to what I needed. Link to comment https://forums.phpfreaks.com/topic/125851-solved-connect-to-sql/#findComment-650785 Share on other sites More sharing options...
Lee-Bartlett Posted September 25, 2008 Share Posted September 25, 2008 do u mean ? <?php $db_host = "localhost"; // Your database host server, eg. db.server.com $db_user = "user"; // User who has access to the database $db_pass = "password"; // User password to access database $db_name = "database"; // Existing database name // -- Connecting to the database (not persistent connection) $connect = mysql_connect($db_host, $db_user, $db_pass); mysql_select_db($db_name,$connect) or die(mysql_error()); ?> Link to comment https://forums.phpfreaks.com/topic/125851-solved-connect-to-sql/#findComment-650787 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.