i need a php program to get symbol from my db table below. the program must be FAST because there are over 4000 symbols
select symbol from StockSymbols;
mysql> desc StockSymbols;
+---------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------+---------+------+-----+---------+----------------+
| StockId | int(11) | NO | PRI | NULL | auto_increment |
| Market | text | NO | | | |
| Symbol | text | NO | | | |
+---------+---------+------+-----+---------+----------------+
3 rows in set (0.00 sec)
crawl the url for the newest news
url is formatted like this
[login to view URL]{Symbol}
sample url [login to view URL]
get all title, link, datetime of article, symbole do the following
if the article is not in the news table below it will insert it into the table
if the article is in the news table already move on to the next symbol
mysql> desc news;
+--------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| title | text | NO | | | |
| link | varchar(200) | NO | UNI | | |
| news_date | datetime | NO | | | |
| news_summary | text | NO | | | |
| newskey | varchar(200) | NO | | | |
+--------------+--------------+------+-----+---------+----------------+
6 rows in set (0.00 sec)
and no duplicates. the crawler will move on to the next symbol after it finds news that it is found already
you understand i do not want any duplicates
and the crawler will move on to the next symbol if it finds a duplicate
you can actually get the last entry from the db and if it matches move on
i need it to be fast becuase there are a lot of symbols