Export Information RSS

RSS – this is just the basis of this material was the article ‘Technology RSS Export Information RSS’ but some of this material appeared – not quite understandable, then, I will try to chew. The first step is to write a script RSS feeds: Create rss.php file and write it in our code: Basis is, the store, but do not close and resolve with which the table will work, say, a table called news and news. We are looking for in our code line: $ re = mysql_query (‘select * from news order by id desc limit 10’) We are interested in: select * from news order by id desc limit 10 select – as translated and running – you can list the table fields selected, and then you can specify * will select all the fields. from – works as well as translated from the table which will be chosen field, in our case as an example to the table ‘news’ order by – faces a value that will be sorting, in this case id news, and will be sorted from top to bottom, but that we do not need so we finish desc – this value will be sorted from bottom to top. limit – the name clear ‘limit’ – Limit the amount of information displayed, so as not to fill up all the materials of the signer – set limit for example 10. Done, now the bottom line analyze shablon.Ischem: # $ res field name in the table, which will be title echo ‘$ res title’; Here we have to slow down a bit, the fact that some news are sorted not in the way I guess – if the structure is watching the news the other – try to find themselves, in general, there should refer to the news. Although it is possible that all the new news you have on one village, and you could specify it as an example: $ link / index.php? Str = news or $ link / news.php $ link variable will contain your url so it does not change.