bhaskar2359 / rssingest

Automatically exported from code.google.com/p/rssingest
0 stars 0 forks source link

Its only working for my if the first result it checks is a new entry.. #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
- What steps will reproduce the problem?
1. I have changed "$item_exists_sql" to check item title instead of id
2. The feed i'm fetching is a Google Alert feed

- What is the expected output? What do you see instead?

The output looks perfect, but nothing new is stored in the rssingest table

- What version of the product are you using? On what operating system?

Latest version, Ubuntu Server 12.04

- Please provide any additional information below.

    A Google Alert feed doesn't always put the newest entry on top, for some reason this seems to be a problem. When the first entry in the rss feed is determined to be an "existing item", any new entries below it do not get inserted to the rssingest table. 

    Everything looks perfect. When the script finds an existing title, it echo's "Not inserting existing item..", when the script finds the title does not exist it echo's "Inserting new item..". But nothing gets inserted. 

    There is nothing wrong with the code that connects to my sever. I know this because I have tried multiple other feeds with the same exact code -the same php file- and they work perfect. All new entries are inserted into the rssingest table.

I'm stumped lol.

Side Note - I am very grateful for your code, it is very well done :)

Original issue reported on code.google.com by CaseyAla...@gmail.com on 15 Apr 2014 at 12:28

GoogleCodeExporter commented 8 years ago
I just ran the code again, and there at the top was a new item. And nothing 
happend. SO I was wrong, its not just with an existing item at the top. Its 
something specific with this feed.

Its so strange though. Its parsing the feed just fine, but doesn't insert it 
into the database..

Original comment by CaseyAla...@gmail.com on 15 Apr 2014 at 1:04

GoogleCodeExporter commented 8 years ago
I figured out the problem. I just had to run mysqli_real_escape_string()on the 
item_title before it was inserted into mysql. 

Sometimes I feel so dumb lol. Hope this helps someone in the future! 

Original comment by CaseyAla...@gmail.com on 15 Apr 2014 at 10:53