Re: [PHP] global variable declaration

2006-02-08 Thread Miles Thompson
At 10:46 AM 2/8/2006, suresh kumar wrote: hai, this is my sample code: i am having user table with SponsorID as one field in mysql database,this is my query; for($j=0;$j<5;$j++): $result=mysql_query("select * from user where SponsorID='$id[$j]' ")

RE: [PHP] global variable declaration

2006-02-08 Thread Jay Blanchard
[snip] for($j=0;$j<5;$j++): $result=mysql_query("select * from user where SponsorID='$id[$j]' "); endfor; in above code when i print mysql_num_rows($result) inside for loop its output is 5.when i print outside the for loop its o/p is 0.I searched weberdev.com website and dec

Re: [PHP] global variable declaration

2006-02-08 Thread Richard Davey
On 8 Feb 2006, at 14:46, suresh kumar wrote: this is my sample code: i am having user table with SponsorID as one field in mysql database,this is my query; for($j=0;$j<5;$j++): $result=mysql_query("select * from user where SponsorID='$id [$j]' "