[eluser]Référencement Google[/eluser]
I am not sure mysql_affected_rows() return something while using a DELETE query.
Also on this point, you should use CI's active record to make your test.
Secondly, it will we good for us to help you that you send the print_r($picture) result.
Also, in your code, there is an extra "." that should not be there: $picture
.= $row->picture;