Current location: Hot Scripts Forums » Programming Languages » PHP » Get PHP to work with MS SQL on NT Machine


Get PHP to work with MS SQL on NT Machine

Reply
  #1 (permalink)  
Old 01-08-04, 01:04 PM
cyberfolli cyberfolli is offline
Newbie Coder
 
Join Date: Jan 2004
Posts: 93
Thanks: 8
Thanked 0 Times in 0 Posts
Get PHP to work with MS SQL on NT Machine

I am using a windows 2000 server with Microsoft SQL

is there any special connection scripts.. to get the php to connect to the sql server


define('DATABASE',"aamcvb");
define('STYLE_SHEET',"goodsStyleSheet.css");
define('AMCVB_ADMIN', "");
define('DB_CONNECT_USERNAME', "username"); define('DB_CONNECT_PASSWORD', "password"); define('DB_HOST', "localhost"); define('PRODUCT_IMAGE_UPLOAD_FOLDER', "/images");
//$style = "goodsStyleSheet.css";
//define('JAVASCRIPT',"/goods.js");
//define('TMP_PATH',"");

//Do not change anything below this line when porting to another system
$DBMS_STARTED = FALSE;
$HTML_OPENED = FALSE;
$HTML_CLOSED = FALSE;
?>
<?php /************************************************** *************************************************
dataBaseConnect establishes connection to database and verifies user
*/
function databaseConnect (&$conn, &$db_id)
{
if ($conn = mysql_connect (DB_HOST, DB_CONNECT_USERNAME, DB_CONNECT_PASSWORD))
{
if ($db_id = mysql_select_db (DATABASE))
{
$GLOBALS["DBMS_STARTED"] = TRUE;
return;
}
Trace(" Cannot connect to database! MySQL Error Message: ".mysql_error(),
__FILE__, __LINE__);
SorryUnavailable(__FILE__, __LINE__);
}
Trace(" Cannot connect to MySQL DBMS server! MySQL Error Message: "
.mysql_error(), __FILE__, __LINE__);
SorryUnavailable(__FILE__, __LINE__);
}?>
Reply With Quote
  #2 (permalink)  
Old 01-08-04, 01:11 PM
ermau's Avatar
ermau ermau is offline
Wannabe Coder
 
Join Date: Aug 2003
Location: Florida, USA
Posts: 240
Thanks: 0
Thanked 0 Times in 0 Posts
Well you're using the MySQL functions

Try here: http://www.php.net/manual/en/ref.mssql.php
__________________
PHP / mySQL Developer
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Art Nexus seeking PHP programmers TheArtNexus Job Offers & Assistance 5 02-26-08 03:08 AM
Help with getting PHP coded software to Work with IIS 6 Tekki Job Offers & Assistance 2 11-20-03 01:30 PM
Need PHP & SQL Script- Willing to Pay! dayzeday Script Requests 4 11-12-03 06:35 PM
PHP Don't work Henry PHP 4 07-22-03 02:36 AM
change my field in this example sal21 ASP 3 07-14-03 02:49 AM


All times are GMT -5. The time now is 08:22 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.