473,396 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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_object().

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_object() function, while not the
best in the world, easier code to follow and easier maintenance.
Nov 17 '05 #1
1 2172
mysql_fetch_object takes a result set and turns it into an object. The most
common usage is:

while ($queryInfo = mysql_fetch_object($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:eT**************@TK2MSFTNGP11.phx.gbl...
Do not know what mysql_fetch_object() does.
But if you are talking about SqlDataReader you can use GetOrdinal.

MyValue = dataReader.GetString(dataReader.GetOrdinal("MYCOLU MN"));
George.
"Jeremy McPeak" <jeremy[nospam]@wdonline.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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_object().

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_object() function, while not

the
best in the world, easier code to follow and easier maintenance.


Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fawke101 | last post by:
Hi there, I have a JS/ASP application that sorts a SQL populated table. This works great, and sorts the data fine, apart from my currency columns. It wants to read the data as text as far as i...
10
by: Ken VdB | last post by:
Hi everyone, Is there a reason why the Mid() function only works in one direction in VBScript? This code works in VB6 but not in VBScript? Is there a way around it? I am trying to create an...
5
by: cppaddict | last post by:
Hi, I'm confused about what the comparison operator in a map template is: In particular, I want to know why something like the following doesn't work: bool pointCompare(POINT p1, POINT p2)...
8
by: chook | last post by:
How i can call my function with some parameters, if i have a pointer to this function
6
by: aurgathor | last post by:
Howdy, How do I pass some function a generic comparison function? I figured out one non-generic case, but since this code got parameter declarations in two places, it's obviously not generic....
14
by: Spoon | last post by:
Hello, I've come across the following comparison function used as the 4th parameter in qsort() int cmp(const void *px, const void *py) { const double *x = px, *y = py; return (*x > *y) -...
2
by: eastern_strider | last post by:
I'm running into problems about defining a comparison function for a map which has a user defined key. For example: class Key { public: string name; int number; Key (na, nu) : name (na),...
0
by: SvenMathijssen | last post by:
Hi, I've been wrestling with a problem for some time that ought to be fairly simple, but turns out to be very difficult for me to solve. Maybe someone here knows the answer. What I try to do is...
5
by: fade | last post by:
Good afternoon, I need some advice on the following: I've got a class that has a member std::vector<CStringm_vFileName and a member CString m_path; The vector contains a bunch of filenames with...
2
by: Scott Rymer | last post by:
I stumbled upon Peter Kellner's ObjectDataSource Generation for Profiles which generates a Membership class to use in ASP.NET. The only problem is, it's in C# and I need it in VB to use it in my...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.