Login Form






Lost Password?
No account yet? Register

Syndicate


 
 
Joomla SEO Problem
User Rating: / 0
Chef's Blog - Cooking with SQL
Written by Datagod   
Thursday, 06 March 2008
ImageI had some problems getting Joomla to be Search Engine Optimized (SEO) on my Netfirms hosted site. Whenever I enabled SEO, the main page would load, but not any of the subpages.

I edited the .htaccess file and tried a few things with no luck.  Netfirms support took a look at th ings and made the following changes:

RewriteEngine On

RewriteBase /


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteRule ^(content/|component/)(.*) index.php/$1$2

RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]


I removed all commented code to keep things clean.  Backup your current .htaccess file and create a new one with the above contents and you should be good to go too!
Last Updated ( Friday, 07 March 2008 )
 
Optimize a MySQL database
User Rating: / 0
SQL Goodies - Performance Tuning
Written by Datagod   
Wednesday, 05 March 2008
ImageIf you have deleted a large part of your table or updated many variable length rows, you should consider running the optimize command.

If you want to quickly generate the optimize commands for every table in you database, executing the following MySQL statement:

select concat("optimize table " , TABLE_NAME , ';')
  from INFORMATION_SCHEMA.TABLES
 where TABLE_SCHEMA <> 'information_schema' order by 1;
 
Open call to Beta testers
User Rating: / 0
Chef's Blog - Tiny Stats
Written by Datagod   
Tuesday, 01 January 2008
ImageWe need beta testers!
There are currently 5 people taking part in the initial beta test. We need more!


What is TinyStats, anyway?

TinyStats is a website visitor tracking system. Every time one of your websites pages is accessed, a call is made to a central server which logs the visitor information such as HostMachine, IPAddress, UserAgent, DomainName, etc. This information is stored in a MySQL database in a series of highly optimized tables.

Every five minutes a process runs that will analyze and summarize the incoming data, making it available for reporting purposes. Image


How is TinyStats different from all the other traffic monitors?
The philosophy behind TinyStats has always been "Keep it simple, keep it Tiny!".

TinyStats is a light-weight, straighforward, easy access system. You can get at your data when you need it without having to jump through hoops, signing on to special areas, etc.

The features that make TinyStats stand out from the crowd are as follows:
  • TinyStats tracks ALL visitors to your site, not just humans with Javascript enabled.
  • The reports are "drillable" via hyperlinks to more reports. You can spend hours drilling into your data, increasing or decreasing the granularity as you see fit.
  • Reports are open for all to see, driving traffic back to your website. Web crawlers (Google, Yahoo, etc) absolutely love crawling the the reports.
  • TinyStats is a community, not a product. We have an active forum with many excellent ideas being bounced back and forth. The main developer (me) is passionate about TinyStats, and thoroughly enjoys responding to user's feature requests.

How can I join the party?

All you need to do is cut and past the following PHP code into each page you want to actively track. You can download the code here.


Where can I learn more?
Visit our forum, or see TinyStats in action!

Thanks!
Last Updated ( Wednesday, 09 April 2008 )
 
String Concatenation
User Rating: / 3
SQL Goodies - Administration
Written by Datagod   
Wednesday, 03 October 2007
Have you ever wanted to retrieve a list of values from a table, storing the results in a string?

Here is simple yet effective method without having to rely on cursors, while loops, or other complex structures.

declare @string varchar(8000)
select @string = ''

select @string = @string + MyColumn
  from MyTable

print @string


It is important to initialize your string to a non-NULL value, otherwise your string will end up as NULL, which is the default behavior of NULLs and string contcatenation.

Give it a try, it works like a charm. 
 
Welcome to Cooking with SQL!
User Rating: / 5
The News - Latest News
Written by Datagod   
Saturday, 12 June 2004

The Datachef Himself!
Cooking with SQL Launched

Greetings! 

Have you ever had a craving for some SQL Pizza?  What about a nice big bowl of Curried Clustered Indexes? 

Cooking with SQL has been in the planning stages for some time now.  My goal is for this site to be a showcase for all the nifty procedures, scripts, functions, etc. that I have written over the years as part of my job as a DBA.

I have a passion for cooking, and a passion for SQL, especially cooking with SQL.   I love rising to the challenge of "It can't be done" or "you can't do that".  I get enormous satisfaction out of using SQL to solve not just business problems but technical puzzles as well.

I specialize in Microsoft SQL Server, but I am branching out to MySQL as well.

I am currently engaged in a Data Warehouse project for a large Government client where I am using Microsoft SQL Server 2005, Analysis Services, Business Intelligence Development Studio (which includes SQL Server Integration Services).  The concepts are old hat, but some of the tools are new.

At the same time, I am quickly learning the ins-and-outs of Google Custom Search Engines and Google's Search AJAX API.  Check out the SQL Hunter for a live demonstration of a work in progress.  I actually find it quite useful for performing SQL related searches.  

Over the coming months, I will be writing many articles dealing with SQL Server 2000 and 2005 performance tuning, troubleshooting, and administrating. 

I will also be publishing an article titled "Log Shipping for the Masses" or something like that.  Why upgrade to SQL 2000 Enterprise Edition when all you really want to do is take your production database and have a warm standby version somewhere else for disaster recovery / reporting purposes?  Well, with my help, you won't have to.

 Stay tuned, I am cooking up some SQL goodies as you read this...

Last Updated ( Thursday, 05 April 2007 )
 

Who's Online

Polls

What is your favorite Relational Database Management System?
 
Visit the SQL Hunter
Joomla Templates by JoomlaShack Joomla Templates
Jordan 13 | Loans | Loans | Free Ringtone | Mortgages