Re: SQL Server through PEAR - problem
| From: | Evan Nemerson | Date: | Sat, 04 Oct 2003 07:44:33 +0000 |
| Subject: | Re: SQL Server through PEAR - problem | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165020@lists.php.net to get a copy of this message | ||
PHP must be compiled --with-mssql in order to use the MS SQL extension.
On Friday 03 October 2003 11:18 pm, orlandopozo@icnet.com.ve wrote:
> Hello mailing list, I try to connect SQL server through PEAR directly, but
> it doesn't work too, this is the code:
>
> <html><head><title>Test DB Class - PEAR</title></head>
> <body>
> <table border=1>
> <tr><th>Estado</th></tr>
> <?php
> //connect
> require_once('DB.php');
> $db =DB::connect("mssql://sa@localhost/videoclub");
> if (DB::iserror($db)) {
> die($db->getMessage());
> }
> //issue the query
> $sql ="SELECT * from tablaEstado";
> $q =$db->query($sql);
> if (DB::iserror($q)) {
> die($q->getMessage());
> }
> //generate table
> while ($q->fetchInto($row)) {
> ?>
> <tr><td><?= $row[0] ?></td></tr>
> <?php
> }
> ?>
> </table>
> </body></html>
>
> this is the output
> DB Error: extension not found
>
> If any could give me hand, I will aprecciate, thanks, bye.
--
Evan Nemerson
evan@coeus-group.com