C#的新手需要帮助从PHP代码转换 [英] New to C# need help translating from PHP code
问题描述
各位大家好!,
我最近决定用另一种语言启动程序而不是PHP。
我已经读过SQLClient但是我不能正确地弄清楚它。
我希望这里有人能掌握这两种语言并且能帮助我理解如何在c#中使用sql server。
我认为我不需要掌握如何使用它,如果有人可以帮助我将以下代码翻译成C#和mssql我会这次只能在C#中继续使用数据库。
$ result = mysql_query( SELECT * FROM mytable);
while($ row = mysql_fetch_array($ result))
{
echo $ row [ 名称]。 ,房间。$ row [ 房间]。 ,Tel。$ row [ Telephone];
}
感谢您阅读我的问题,并提前感谢此帖的每一个回复。
问候。
Leon
结果 = mysql_query(< span class =code-string> SELECT * FROM mytable);
while(
row = mysql_fetch_array(
result))
{
回波
Hello everybody!,
I recently decided to start program in another language than PHP.
I have read up on SQLClient but can''t rly figure it out properly.
I was hopeing that someone here had a grasp of both languages and could help me understand how to work with a sql server in c#.
I don''t think i need much to get a grasp on how to use it, if someone could help me translate the following code into C# and mssql i would have enough to keep working with databases only this time in C#.
$result = mysql_query("SELECT * FROM mytable");
while($row = mysql_fetch_array($result))
{
echo $row["Name"].", Room ".$row["Room"].", Tel ".$row["Telephone"] ;
}
Thank you for reading my question, and thanks in advance for every reply that this post gets.
Regards.
Leon
result = mysql_query("SELECT * FROM mytable"); while(
row = mysql_fetch_array(
result)) { echo
这篇关于C#的新手需要帮助从PHP代码转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!