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 #172775 is a reply to message #172765] Mon, 28 February 2011 18:48 Go to previous message
P E Schoen is currently offline  P E Schoen
Messages: 86
Registered: January 2011
Karma:
Member
"Jerry Stuckle" wrote in message
news:ikg1jr$u6q$1(at)news(dot)eternal-september(dot)org...

> What is the value of 'name' + 1?

> Associative array indexes are not numeric, so you can't
> increment them.

I was attempting to do what I have done in Borland Delphi, where array
indexes are always numeric, but can be referenced by enumerations that are
simply aliases for numeric values.

Here are ways to emulate that, but it seems too complicated to make it
worthwhile:
http://stackoverflow.com/questions/254514/php-and-enums
http://it.toolbox.com/blogs/macsploitation/enums-in-php-a-native-implementa tion-25228
http://www.satya-weblog.com/2008/03/search-in-keyindex-of-anphp-array.html

> And although SQLLite can return an array with both indexed
> and associative arrays, odbc_fetch_array() doesn't.

I don't know how SQLite does this, but essentially it must create the
equivalent of another associative array which has a 1:1 correspondence of
the text key indexes and a numeric value of the row of the array. I suppose
it would work to assign numeric variables with numeric row indexes, such as:

$nID=0; $nName=1; $nEmail=2;

Then it would probably be legal to use:

For( $i=$nID; $i<=$nEmail; $i++ )

Just some ideas. Thanks.

Paul
[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 18:37:53 GMT 2024

Total time taken to generate the page: 0.05035 seconds