Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

num_rows and fetch array using access

Status
Not open for further replies.

manicleek

Technical User
Joined
Jun 16, 2004
Messages
143
Location
GB
I have so far been using PHP with MySQL, however I am currently doing a site using Access and I need to know what the equivelent for mysql_fetch_rows and mysql_fetch_array are.

Bearing in mind I am not using an odbc connection its ADO
 
you want something like:
$conn=odbc_connect("yourodbcsource","","");
$qry = "select firstname,lastname from staff where staffid = 3";
$rs = odbc_exec($conn,$qry);
while (odbc_fetch_row($rs))
{
$firstname = odbc_result($rs,"firstName");
$lastname = odbc_result($rs,"lastName");
printf("%s %s\n",$firstname,$lastname);
}
 
I was hoping for a way to do it without using odbc
 
Fair enough, I'm not aware of an ADO extention for PHP but it does have a COM interface. ADO is a wrapper (and more) over oledb so you should be able to get it to work, but I bet it will be hard.
My question is why do you not want to use ODBC ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top