Re: PHP Database Connectivity
| From: | Joey++ | Date: | Wed, 24 May 2000 07:53:14 +0000 |
| Subject: | Re: PHP Database Connectivity | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-73@lists.php.net to get a copy of this message | ||
try this simple DSN based ODBC example,
<? $db=odbc_connect("mydb1", "user", "pass");
$sql_string="SELECT * FROM news;";
$result=odbc_exec($db, $sql_string);
?>
<p> </p>
<p align="center"><font face="Verdana, Arial, Helvetica, sans-serif"
size="2" color="#000000"><b>Show full
articles</b></font></p>
<table cellpadding="0" cellspacing="0" border="0"
align="center">
<tr>
<td>
<? odbc_result_all($result);
?>
</td></tr></table>
<? odbc_close_all();
?>
this should give you a start
Tom Benson <tom.benson@wcom.com> wrote in message
news:NEBBLKFPBKDPBDDMAKANGEAMCAAA.tom.benson@wcom.com...
> To anyone that may know...
>
> My group has had success in running PHP scripts in our WinNT Server
> environment. However, we are now trying to establish a database
connection
> using the guidelines outlined in "PHP Programming -- Browser-Based
> Applications." Since the book is written under the assumption that the
end
> user is using the Linux OS, making the translation on how to establish the
> connection in an NT Server environment is rather confusing.
>
> Does anyone out there know how and where can I get comparable instructions
> on how to set up the DB connection in a NT environment? Is this even
> possible?
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>