As Chris said, it won't work. The reason is that when you use the following:
while($row = mysql_fetch_array($result,MYSQL_BOTH))Two things happen on every iteration: the mysql_fetch_array gets called and returns one row from the database. (That's the purpose of the function, it only returns one row at once). Then the value of the row gets immediately assigned to $row. Note that the assignment operator (=) is used, not the equality operator (==). That's a crucial difference. Then, the while loop checks the value of the expression as a whole. As long as there are still rows remaining, the result of mysel_fetch_array (and, consequently, of the value of $row, and of the value of the whole assignment expression) evaluates to true. That's what the while loop condition checks. When mysql_fetch_array returns false, it signals the end of the data set and thus the while loop ends.