RE: [PHP] What's wrong????
| From: | John Holmes | Date: | Tue, 30 Apr 2002 06:43:27 +0000 |
| Subject: | RE: [PHP] What's wrong???? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95311@lists.php.net to get a copy of this message | ||
Maybe, but I believe he's trying to connect to MSSQL, which uses mssql_*
functions.
---John Holmes...
> -----Original Message-----
> From: hugh danaher [mailto:hdanaher@earthlink.net]
> Sent: Monday, April 29, 2002 8:36 PM
> To: php
> Subject: Re: [PHP] What's wrong????
>
> Arpan De,
> you have mysql not mssql. Your statement might work if you change it
>
> from mssql_connect()
> to mysql_connect()
>
> Hope this helps,
> Hugh
>
>
> ----- Original Message -----
> From: "Arpan De" <dearpan1974@hotmail.com>
> To: <php-general@lists.php.net>
> Sent: Monday, April 29, 2002 6:09 PM
> Subject: Re: [PHP] What's wrong????
>
>
> > Hi John,
> >
> > Thanks for your prompt reply. I am using PHP 4.2.0 version. I
checked
> the
> > PHP.ini file where it is given the following:
> >
> > ;Windows Extensions
> > ;Note that MySQL and ODBC support is now built in, so no dll is
needed
> for
> > it.
> > ;
> > ;extension=php_bz2.dll
> > ...................................
> > ...................................
> > ;extension=php_mssql.dll
> >
> > which, I guess, is already uncommented. What do I do now to execute
some
> > transaction with SQL Server 7.0? Also what do I search for in
phpinfo()?
> >
> > Regards,
> >
> > Arpan
> >
> > "John Holmes" <holmes072000@charter.net> wrote in message
> > news:001901c1effa$ec9c8e30$b402a8c0@mango...
> > > You don't have MSSQL support in your PHP installation. Uncomment
the
> > > line in PHP.ini that loads the MSSQL .dll
> > >
> > > Use a phpinfo() file to see what modules are loaded.
> > >
> > > You're making this hard on yourself...PHP is easy to learn.
> > >
> > > ---John Holmes...
> > >
> > > > -----Original Message-----
> > > > From: Arpan De [mailto:dearpan1974@hotmail.com]
> > > > Sent: Monday, April 29, 2002 5:42 PM
> > > > To: php-general@lists.php.net
> > > > Subject: [PHP] What's wrong????
> > > >
> > > > What is wrong with the following code?
> > > >
> > > > <?php
> > > >
> > > > $connection=mssql_connect("SQLServerName","sa","")
> > > > or die("Couldn't make connection");
> > > >
> > > > $db=mssql_select_db("DBName",$connection);
> > > > $sql="SELECT FName,LName,UserID FROM tblName ORDER BY FName";
> > > >
> > > > $sqlResult=mssql_query($sql,$connection);
> > > >
> > > > while($row=mssql_fetch_array($sqlResult)){
> > > > $firstname=$row["FName"];
> > > > $lastname=$row["LName"];
> > > > $userid=$row["UserID"];
> > > >
> > > > echo("<tr>");
> > > > echo("<td>$firstname</td>");
> > > > echo("<td>$lastname</td>");
> > > > echo("<td>$userid</td>");
> > > > echo("</tr>");
> > > > }
> > > >
> > > > mssql_free_result($sqlResult);
> > > > mssql_close($connection);
> > > > ?>
> > > >
> > > > When the above code is executed, I am getting the following
error:
> > > >
> > > > Fatal error: Call to undefined function mssql_connect()
> > > >
> > > > which points to the 2nd line in the code. Even the die()
function
> > > doesn't
> > > > get executed. I just copied & pasted the code from a tutorial I
> found
> > > on
> > > > the
> > > > web but am still getting this error !!! Is learning PHP so
> > > frustrating? I
> > > > have never encountered such frustration while learning any other
> > > software
> > > > languages. It's making me too dependent on this newsgroup !!!
> > > Sometimes it
> > > > does happen that in other languages, if you are getting an
error,
> one
> > > can
> > > > overcome that particular error by employing some trial & error
> methods
> > > but
> > > > whatever & whenever I have tried to do the same in PHP, I could
> never
> > > > overcome the error.
> > > >
> > > > Thanks,
> > > >
> > > > Arpan
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.phppZÚÞfà
> > > > Aˬ ,
> > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php