ASP.NET/PHP Function Comparison

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeremy McPeak

    ASP.NET/PHP Function Comparison

    I am new to ASP.NET. For the past few years, I have used PHP as my
    server-side technology. I am wondering if there is any reference that will
    show me any like functions/methods between the two languages. I am
    specifically looking for a comparable mysql_fetch_obj ect().

    I started fooling around with ADO.NET, but I have not found a method that
    will allow me to pull information from a datasource except by using the
    number of the field (ugh). The mysql_fetch_obj ect() function, while not the
    best in the world, easier code to follow and easier maintenance.


  • Jeremy McPeak

    #2
    Re: ASP.NET/PHP Function Comparison

    mysql_fetch_obj ect takes a result set and turns it into an object. The most
    common usage is:

    while ($queryInfo = mysql_fetch_obj ect($result)) {
    echo $queryInfo->fieldname;
    }

    I must have missed GetOrdinal. I will take a look at it. Thanks for your
    help!

    "George Ter-Saakov" <we@hotmail.com > wrote in message
    news:eTFRwhxPDH A.2256@TK2MSFTN GP11.phx.gbl...[color=blue]
    > Do not know what mysql_fetch_obj ect() does.
    > But if you are talking about SqlDataReader you can use GetOrdinal.
    >
    > MyValue = dataReader.GetS tring(dataReade r.GetOrdinal("M YCOLUMN"));
    >
    >
    > George.
    >
    >
    > "Jeremy McPeak" <jeremy[nospam]@wdonline.com> wrote in message
    > news:%23ZYPVcxP DHA.2768@tk2msf tngp13.phx.gbl. ..[color=green]
    > > I am new to ASP.NET. For the past few years, I have used PHP as my
    > > server-side technology. I am wondering if there is any reference that[/color]
    > will[color=green]
    > > show me any like functions/methods between the two languages. I am
    > > specifically looking for a comparable mysql_fetch_obj ect().
    > >
    > > I started fooling around with ADO.NET, but I have not found a method[/color][/color]
    that[color=blue][color=green]
    > > will allow me to pull information from a datasource except by using the
    > > number of the field (ugh). The mysql_fetch_obj ect() function, while not[/color]
    > the[color=green]
    > > best in the world, easier code to follow and easier maintenance.
    > >
    > >[/color]
    >
    >[/color]


    Comment

    Working...