YES!!!...you are so correct, I apologize for wasting everybody's time, I overlooked that, cant tell how many times I reviewed those lines and saw what I wanted to put there and not what is .
You are fortunate that the Primary Key constraint stopped your error from corrupting the production database. I would suggest you ask your DBA to create a user with SELECT only privileges and use that for $from_feed_user instead of root.