RE: Re: Super bizarre changing variable!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Brian Dunning wrote:
> > I'm running the following code:
> > 
> > $query3 = "DELETE FROM table1 WHERE referer=$referer ORDER BY creation
> > LIMIT $numtodelete";
> > $result3 = mysql_query($query3);
> > $string = "$total found, $n kept, $numtodelete extras removed ($query3)";
> > $x = mysql_query("insert into table2 (friend_id,data) values
> > ($referer,'$string')");
> > 
> > I created the table2 log file just so I could see what the hell is going
> > on. Here is a typical entry in table2:
> > 
> > FRIEND_ID = 8388607
> > 
> > DATA = 908 found, 100 kept, 808 extras removed (DELETE FROM table1 WHERE
> > referer=69833818 ORDER BY creation LIMIT 808)
> > 
> > Notice that the value in FRIEND_ID, which was set with $referer, is
> > DIFFERENT than the value of $referer shown in DATA! How the flying
> > f*&^%k is this possible??? I've been tearing my hair out for 3 days over
> > this.
> > 
> > Almost all records show 8388607 in that FRIEND_ID field. Once in a blue
> > moon, a different value is shown, which does match the value in DATA. So
> > it's displaying this erroneous behavior 95% of the time but not always.
> 
> Sorry, I reread it and what you say makes sense now.... I am tired!!
> 
> OK, I give. It's odd and confusing :)
> 
> Col

Are you showing us the real code?

(I only came in on this post)

>From your posted code, I think your DATA value should be the literal 7 characters $string.

_________________________________________________________________
Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare!
http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux