Forum Moderators: open

Message Too Old, No Replies

Sql code

         

stevelibby

10:01 am on Jan 30, 2006 (gmt 0)

10+ Year Member



Jusat checking
Where should the sql in the page go? above <html>
or between the <html><head> or other, i have placed mine in above the <html>, however indexing seems to be a problem!

Dijkgraaf

10:53 am on Jan 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What scripting language are you using?
I'm assuming ASP as with .NET the SQL code will usually be in a seperate code behind file.

The SQL code won't be sent to the browser, but rather executed server side, so is doesn't matter where it is in the page except that it has to be before the part of the page where you output the results.

However after saying that, it gives you more flexability if you place it before the <html> or any other Response as you can then do tricks like issuing a 301 or 302 redirect if necessary and this needs to occur before you actually start sending any other response to the browser.

How is it being indexed, and what is the problem you are encountering?

stevelibby

12:42 pm on Jan 30, 2006 (gmt 0)

10+ Year Member



yes i use asp and i put the code before any html, i have noticed that there is no index details about the site in google, yet other search engines are fine.

txbakers

1:05 pm on Jan 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I put most of my queries before the HTML if it makes sense. Sometimes I'm creating reports, so for each line generated I need to run multiple queries - they run within the HTML.

Search engines don't know what you are doing with SQL statements, they only read HTML.

Dijkgraaf

8:32 pm on Jan 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Where you place the SQL will have no effect on Google, as it only gets to see the final output HTML.

Some people have described a sandbox effect with Google, in that domains that are newly registered won't appear in Google's indexes for up to six months.
Other people deny that this exists. I've never seen a statement from Google on the matter.
The only thing you can do is see if you can get more inbound links from other sites, and eventually you will appear in Google.
Do a search for Google Sandbox and you will find a lot of talk on this subject.