Re: Updating the SQL key value
- From: Toby A Inkster <usenet200703@xxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Mar 2007 13:22:09 +0100
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.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
.
- References:
- Updating the SQL key value
- From: bill
- Re: Updating the SQL key value
- From: Toby A Inkster
- Re: Updating the SQL key value
- From: bill
- Updating the SQL key value
- Prev by Date: Re: Encoding/characterset/font family confusion
- Next by Date: Re: Updating the SQL key value
- Previous by thread: Re: Updating the SQL key value
- Next by thread: Re: Updating the SQL key value
- Index(es):
Relevant Pages
|