It is very convenient to use the PHP include() function when creating websites. Some extra-conscious webmasters, like me would think twice before using that function especially when it comes to Search Engine Optimisation(SEO).
When I asked people and referrred to real-life examples, all my worries were relieved when I learnt about it. The crawler or the spider is pretty much comparable with a general visitor on your website except that it has some extended capacities in certain areas and can't enjoy the javascript on your pages! So the crawler will see the text content as you see it. If are interested in seeing how a what a crawler sees in your webpage, you can download a text-only browser such as Elinks and visit your pages.
Almost all of the forums, CMS, blogs make atleast few instance of use of this function and they are doing good. So be relaxed and use them!
However, if you plan to include files hosted on website other than yours, you may need some inputs from an article at FAQTs and PHP.net(official site, read the warnings in red background carefully on that site)
Thursday, January 17, 2008
Supplied argument is not a valid MySQL result resource
When I was learning PHP-MySQL, this may one of the most common errors I encountered. I know it feels very bad when you enthusiastically run a query and the server return the error "supplied argument is not a valid MySQL result resource". For rechecking the code I realised that the query was not constructed properly.
Incorrect syntax is the most common offender for newbies. Possibly error lies somewhere in:
It will tell where you went wrong without having to spend time searching the internet.
Incorrect syntax is the most common offender for newbies. Possibly error lies somewhere in:
- You did not spell SELECT correctly. While typing rapidly, it is very common to misplace an E somewhere.
- You did not include the asterik (*). It Should be "SELECT * FROM table WHERE..."
- You declared the variable containing the query wrongly or did not call it properly. Eg: declaring $query to contain the variable and calling mysql_query to process some other variable like mysql_query($qurey).
- You did not connect to the server properly. Either you supplied incorrect login details or chose the incorrect database/table.
It will tell where you went wrong without having to spend time searching the internet.
An inbound link from Wikipedia: Is it still valuable in SEO ?
Anybody webmaster who knows the competition in Google's or Yahoo!'s search rankings knows the importance of inbound links. SEO experts have always been stressing on getting inbound links pointing to your site. While this does work, there is a difference is how the inbound links are weighed. For eg: 100 inbounds links from small sites may not be worth even close to one inbound link from a Yahoo!, CNN, BBC, or any other 'high quality' website for that matter. But what about 'Wikipedia' ?
Majority of the users trust Wikipedia as a source of 'reliable' information. As most of you know, the content of Wikipedia is user-editable. This means you could visit a page and edit it. When webmasters learn this, they are tempted to have inbound links from Wikipedia. They would create a shot article with their keyword in the title of the article and link to their websites either in the body of article or 'External links and references'. If this was not enough, it meant that your competitor could edit that article you created, and change the links to point them towards his site. Now that would be a very nasty game and result in a dreadful experience for millions who come daily to Wikipedia to get reliable information.
A simple attribute in hyperlinks, called as "rel" when set to "nofollow" does the needful. To see it, simply visit Wikipedia and view the HTML source of the page. Try to find the hyperlinks and observe that they have a rel="nofollow" attribute. This prevents the crawlers from attaching any significance to the link.
However, if you wish you still create a inbound link from Wikipedia, do it only if you have something of value to offer to your visitors. They might follow the link and visit your site. Good luck!
Majority of the users trust Wikipedia as a source of 'reliable' information. As most of you know, the content of Wikipedia is user-editable. This means you could visit a page and edit it. When webmasters learn this, they are tempted to have inbound links from Wikipedia. They would create a shot article with their keyword in the title of the article and link to their websites either in the body of article or 'External links and references'. If this was not enough, it meant that your competitor could edit that article you created, and change the links to point them towards his site. Now that would be a very nasty game and result in a dreadful experience for millions who come daily to Wikipedia to get reliable information.
A simple attribute in hyperlinks, called as "rel" when set to "nofollow" does the needful. To see it, simply visit Wikipedia and view the HTML source of the page. Try to find the hyperlinks and observe that they have a rel="nofollow" attribute. This prevents the crawlers from attaching any significance to the link.
However, if you wish you still create a inbound link from Wikipedia, do it only if you have something of value to offer to your visitors. They might follow the link and visit your site. Good luck!
Subscribe to:
Posts (Atom)