Looking for Documentation On PHP and ODBC

I am new to PHP but I get it.  I am trying to connect to an Access DB via ODBC and have mostly been successful, but the debugging process is painful because I can't seem to find any documentation to explain some of the errors I encounter, for example "Resource ID #7".  What does that mean?  Can somebody point me toward a reference that explains these "resource ids" and the like?

Mike
shachoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shachoAuthor Commented:
I should add that I realize that "Resource ID ???" may not be an error but a datatype - still I can't seem to find any references.
0
edster9999Commented:
Your right it is not an error but a pointer to your open connection.

(example text taken from
http://www.w3schools.com/PHP/php_db_odbc.asp )

$conn=odbc_connect('northwind','','');
$sql="SELECT * FROM customers";
$rs=odbc_exec($conn,$sql);

At this point rs is a resource.  I assume you are trying to do echo "$rs" or something similar.

First you need to pull up a row :

odbc_fetch_row($rs)

Then take the data out of a field inside that row (or record) :

$compname=odbc_result($rs,"CompanyName");
echo "$compname";


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Loganathan NatarajanLAMP DeveloperCommented:
0
shachoAuthor Commented:
Thanks!

Mike
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.