Re: Updating the SQL key value



Toby A Inkster wrote:
bill wrote:

One additional question: does the foreach loop terminate because the query return false ?

It terminates as soon as the query has run out of rows.

It's a PHP 5 feature called "Iterators" -- that is PDO queries are
returned as objects that, although they are not arrays, can be treated as
arrays in a foreach loop. The solution would work equally well using PHP 4
constructs, but the code doesn't look as neat.


THank you,

I am stuck using 4.x because my hosting company does not have PHP5 available, yet.

What would be the php 4 code ?


Thanks to all (even Jerry, who thinks that we should be elsewhere) for the great discussion.

bill
.



Relevant Pages

  • Re: Need help on PHP for MPE/ix
    ... This would mean that either PHP does not know how to update arrays or that the program code for updating the arrays is incorrect. ... Pavan Kumar Rati wrote: ... HP31900A.05.04 FILE COPIER HEWLETT-PACKARD CO. 1999 ...
    (comp.sys.hp.mpe)
  • Re: [PHP] Arrays and performance
    ... where some of our customers have *alot* of products. ... XML file and prompts the user that this file is to large for automatic ... >From what I understand of your answer you're telling me that PHP ... itself will not have any "problems" working with 1.000.000.000 arrays, ...
    (php.general)
  • Re: Fw: question
    ... As a matter of fact Perl has: ... With the above functions and arrays and hashes there are very few data ... Also, PHP is a very different language then Perl, remember that. ... What happens if I add or remove keys from a hash while iterating over it? ...
    (perl.beginners)
  • Re: PHP/Oracle - Pulling data into array
    ... >this up for you and gives you PHP arrays. ... OCIFetchInto fetches a single row as an array. ... Or, OCIFetchStatement, which fetches an array of arrays ... Optionally bind PHP variables to result set columns. ...
    (comp.lang.php)
  • Re: Dynamic Multi-dimensional arrays
    ... Applying the found examples (on arrays) to my code produces errors ... I suggest that you download the PHP manual from PHP.net: ... I don't mind using arrays or objects, but this is what I have ... >> This will be used to create my family tree which is stored on a mysql ...
    (alt.php)