PDA

View Full Version : PHP/ms SQL


oneboxonene
03-20-2004, 11:34 AM
I'd appreciate any sample codes (Useing "foo") illustrating SUCCESFUL php/ms sql connect&query to Discount.ASP db's. Or modification to sample below:

<?
$msconnect=mssql_connect("MyServer70","sa","");
$msdb=mssql_select_db("Northwind",$msconnect);
$msquery = "select titleofcourtesy,firstname,lastname from employees";
$msresults= mssql_query($msquery);
while ($row = mssql_fetch_array($msresults)) {
echo "<li>" . $row['titleofcourtesy'] . " " . $row['firstname'] . " " . $row['lastname'] . "</li>\n";
}
?>

bruce
03-21-2004, 11:39 AM
see this

http://kb.discountasp.net/article.aspx?id=10086


[b]quote:Originally posted by oneboxonene


I'd appreciate any sample codes (Useing "foo") illustrating SUCCESFUL php/ms sql connect&query to Discount.ASP db's. Or modification to sample below:

<?
$msconnect=mssql_connect("MyServer70","sa","");
$msdb=mssql_select_db("Northwind",$msconnect);
$msquery = "select titleofcourtesy,firstname,lastname from employees";
$msresults= mssql_query($msquery);
while ($row = mssql_fetch_array($msresults)) {
echo "<li>" . $row['titleofcourtesy'] . " " . $row['firstname'] . " " . $row['lastname'] . "</li>\n";
}
?>
</blockquote id="quote"></font id="quote">

tsuchan
12-26-2006, 08:18 AM
The code provided on the link is for MySQL. The poster asked about MS SQL.

raymondp
12-26-2006, 11:54 AM
Try these links.
http://kb.discountasp.net/article.aspx?id=10022
http://kb.discountasp.net/article.aspx?id=10428