View Single Post
Old 09-13-2012, 05:57 PM   PM User | #3
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
PHP Code:
            $info2 mysql_fetch_array($data2);
// . . .
            
while($info2 mysql_fetch_array($data2)){ 
You've already fetched the first row into $info2. Calling it in the while now starts at the second record.
If you need to keep this if branch check (invert it with a ! and remove the empty braces instead of using an else), then change the while loop into a do/while loop and it will function properly. Alternatively use mysql_data_seek to change your record. Personally I'd alter the query since you don't need to use that if/else branch there at all; simply add a check on that field for either not an empty string (if its an empty string), or not is null check if its null.
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
cast_no_shadow (09-21-2012)