Uncomment the extension in your php.ini,
usually in:

c:\winnt\php.ini


On Wed, 2003-06-18 at 10:57, Gary Ogilvie wrote:
> If I take out the "@" sign I get the following error:
> 
> Fatal error: Call to undefined function: mssql_connect() in F:\Program
> Files\Apache Group\Apache2\htdocs\REPRO\reprotables.php on line 10
> 
> Any more ideas? =)
> 
> -----Original Message-----
> From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
> Sent: 18 June 2003 15:51
> To: Gary Ogilvie; [EMAIL PROTECTED]
> Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X Windows
> Machine
> 
> [snip]
> <?php
>  
> $myServer = "192.92.0.248"; 
> $myUser = "repro"; 
> $myPass = "repro"; 
> $myDB = "repro";
>  
> print ("Attempting to connect to MSSQL - <br>");
>  
> $s = @mssql_connect($myServer, $myUser, $myPass)
> or die("Couldn't connect to SQL Server on $myServer");
>  
> print ("stage2");
>  
> $d = @mssql_select_db($myDB, $s) 
> or die("Couldn't open database $myDB");
>  
> #this is the create bit
> print ("Connected trying to send the query!<br>");
>  
> $query = "CREATE TABLE customer (id bigint NULL, cus_name char(100)
> NULL, address1 char(100) NULL, address2 char(100) NULL, town char(50)
> NULL, county char(50) NULL, postcode char(30) NULL, tel char(30) NULL,
> fax char(30) NULL, mobile char(30) NULL, email char(50) NULL, notes
> char(250) NULL)"
> or die("Creating table failed");
>  
> $result = mssql_query($query); 
>  
> print ("Tables Created");
>  
> ?>
> [/snip]
> 
> See anything wrong here...
> $s = @mssql_connect($myServer, $myUser, $myPass)
> $d = @mssql_select_db($myDB, $s) 
> 
> ??? Remove the '@' signs and you should go just fine if your user has
> permissions to create tables;
> 
> HTH!
> 
> Jay
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to