Actually the @ just supress's error messages.
And even then, the "or die" part would still get
executed if the function error'd out.
On Wed, 2003-06-18 at 10:51, Jay Blanchard wrote:
> [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
--
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