I got problem here. im updating name where B has the biggest value.
so the results are
B | name
---|------
1 |
2 |
3 | YES
but wh
I think you want to update the row in the the table where column B is the highest value? You definitely need a "WHERE" clause, but you also need to know the highest value in that column. Why don't you query the database first to retrieve the highest value from column B?
$maxvalue = "SELECT `B` FROM products ORDER BY `B` DESC LIMIT 1"
and then insert into the database WHERE the column B equals this value?
"UPDATE products SET name='YES' WHERE B = $maxvalue"
This is not complete code, just conceptual. I will clean it up and edit this answer...