FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » ODBC Connection
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: ODBC Connection [message #172729 is a reply to message #172726] Sun, 27 February 2011 18:36 Go to previous messageGo to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
On Sun, 27 Feb 2011 09:57:11 -0800 (PST), bruceaj wrote:

> I am connecting to an MS Access database. The connection and exec work
> fine. My problem is getting the data.
>
> The following two statement work;
> $row = odbc_fetch_array($rs);
> $value = $row['Newspaper'];
>
> If I change to
> $value = $row[1];
>
> is_null($value) returns true.
>
> What am I doing wrong or is an idiosyncrasy of using MS Access?
>
> Bruce

I'd say it's due to the fact you did not define $row[1].
Instead, you used 'newspaper' as the row identifier.
It can't find [1] so it reports an error.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: static vs global variable
Next Topic: SOCIAL NETWORK FOR PHP PLATFORM..
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 19:01:02 GMT 2024

Total time taken to generate the page: 0.07193 seconds