Search row error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

Search row error

Post by ljCharlie »

Can anyone tell me why I got an error on this?

while ($row = mysql_fetch_array($result)){
$unqiueID = $row["dirID"];
}

This should fine, right?

ljCharlie
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

what error are you getting?
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Whats the error ???

Code: Select all

#another method
while ($row = mysql_fetch_assoc($result)){
$unqiueID = $row['dirID'];
echo $row['dirID'];
}
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

Post by ljCharlie »

Many thanks for your help. I got it working now. Actually I forgot one } bracket after the wile loop because I have an IF statement before this while loop.

ljcharlie
Post Reply