2009/4/27 9el le...@phpxperts.net:
Thanks for the clarification, Mike. In my ignorance, I was under the
impression that the right side of the equation was only for the use of
the left part. How stupid of me. So what I should have been doing was
$Count1 = $Count + 1; right?
$Count1 =
Thats why I used a (?) after exactly. PJ didn't have a need for the value.
;)
On 27 April 2009 14:21, PJ advised:
Ford, Mike wrote:
On 26 April 2009 22:59, PJ advised:
kranthi wrote:
if $Count1 is never referenced after this, then certainly this
assignment operation is redundent. but assignment is not the ONLY
operation of this statement. if u hav not noticed a
Ford, Mike wrote:
On 27 April 2009 14:21, PJ advised:
Ford, Mike wrote:
On 26 April 2009 22:59, PJ advised:
kranthi wrote:
if $Count1 is never referenced after this, then certainly this
assignment operation is redundent. but assignment is not the ONLY
$Count = $Count + 1; is *exactly(?)* same as $Count++; Â or ++$Count
But not exactly same. Â PostFix notation adds the value after assigning
.
PreFix notation adds the value right away.
But optimized programming argues about how machine is coded nowadays.
Thanks Mike for clarifying this
Richard Quadling wrote:
2009/4/27 9el le...@phpxperts.net:
Thanks for the clarification, Mike. In my ignorance, I was under the
impression that the right side of the equation was only for the use of
the left part. How stupid of me. So what I should have been doing was
$Count1 = $Count +
On 26 April 2009 22:59, PJ advised:
kranthi wrote:
if $Count1 is never referenced after this, then certainly this
assignment operation is redundent. but assignment is not the ONLY
operation of this statement. if u hav not noticed a post increment
operator has been used which will affect the
Ford, Mike wrote:
On 26 April 2009 22:59, PJ advised:
kranthi wrote:
if $Count1 is never referenced after this, then certainly this
assignment operation is redundent. but assignment is not the ONLY
operation of this statement. if u hav not noticed a post increment
operator has
Thanks for the clarification, Mike. In my ignorance, I was under the
impression that the right side of the equation was only for the use of
the left part. How stupid of me. So what I should have been doing was
$Count1 = $Count + 1; right?
$Count = $Count + 1; is exactly(?) same as $Count++;
I have pagination set up and the number for pages next has a link but
the next does not. I have experimented with all sorts of
configurations of the code but the only thing that works (and this is
totally off the wall) is to do this
*$Count* = *mysql_num_rows($results);*
$Count1=*$Count++;* //
What parameters are you pasing in the link? That will be the telling
point of what you are doing wrong. You could pass the search params
( though these are best kept in a session or cookie ) and the offset
counter to get the next block of results.
Sorry for top posting.
Bastien
Sent from
9el wrote:
I have pagination set up and the number for pages next has a link but
the next does not. I have experimented with all sorts of
configurations of the code but the only thing that works (and this is
totally off the wall) is to do this
*$Count* = *mysql_num_rows($results);*
kranthi wrote:
if $Count1 is never referenced after this, then certainly this
assignment operation is redundent. but assignment is not the ONLY
operation of this statement. if u hav not noticed a post increment
operator has been used which will affect the value of $Count as well,
and this
Look for Pagination with PHP + MySQL and watchit
http://www.google.com/url?sa=tsource=webct=rescd=10url=http%3A%2F%2Fwww.bestechvideos.com%2F2008%2F07%2F02%2Fsampsonvideos-php-pagination-part-2ei=ohn0SdnlL8KLkAWQrNTbCgusg=AFQjCNEGKOIG3791BpgeVqCiiq5-cikbRA
Dont miss this SampsonVideos .
Phpster wrote:
What parameters are you pasing in the link? That will be the telling
point of what you are doing wrong. You could pass the search params (
though these are best kept in a session or cookie ) and the offset
counter to get the next block of results.
Actually, I am trying to use
Oh, the code works ok. Without the $Count1 = $Count++; it does not work.
If you are saying it should be $Count+; it does not matter. That's
what's weird.
I think it would work no matter what I put in it could be $Count1 =
$Countmeoutandcrap; and I think it would still work.
The similar behaviour
if $Count1 is never referenced after this, then certainly this
assignment operation is redundent. but assignment is not the ONLY
operation of this statement. if u hav not noticed a post increment
operator has been used which will affect the value of $Count as well,
and this operation is required
Is the $Count++..
-Mensagem original-
De: PJ [mailto:af.gour...@videotron.ca]
Enviada em: sexta-feira, 24 de abril de 2009 21:14
Para: php-general@lists.php.net
Assunto: [PHP] inexplicable behaviour
Frankly, I don't know what to look for or why something so weird would
happen:
I have
18 matches
Mail list logo