September 23, 2013

A complex mysql “over” query

mysql

A complex mysql “over” query SELECT Candidates.CID, Candidates.NAME, Candidate_Scores.SCORE FROM Candidates, (SELECT CID, SCORE FROM ( SELECT CID, SCORE, Rank() over (Partition BY CID ORDER BY SCORE DESC ) AS Rank FROM Candidate_Scores ) rs WHERE Rank

April 26, 2013

SQL, MY SQL, T-SQL Interview Mostly Asked Question’s

Question (1): simple select query from multiple table using join’s ? The Query is SELECT sg.username,lg.user_id,lg.login_date FROM `sign-up` AS sg LEFT JOIN `log-in` as lg on sg.id=lg.user_id; Question (2): get lasttime login date of each user ? The Query is SELECT sg.username,sg.id, max(lg.login_date) as lastlogin FROM `sign-up` AS sg LEFT JOIN `log-in` as lg on […]

December 8, 2011

Mysql Max Import Size Phpmyadmin

Mysql Max Import Size Phpmyadmin Sometimes this simple solution gets a different turn when we go to modify the mysql related phpmyadmin max import size from 2M to more. And it is mostly because that wampserver has different menus for PHP, MySql and Apache configuration. But a rule of thumb can resolve this issue here […]

July 10, 2011

mysql if statement can speed up website loading time

mysql if statement can speed up website loading time There are my reasons which can slow down the dynamic website while web page is processing and processing is depending upon your hosting server specification. Although we can not say that put maximum load to MySql or on Server Side Scripting. But the better option to […]

June 14, 2011

Error establishing a database connection

wordpress

Error establishing a database connection WordPress is a sophisticated framework and a lot of help available online. Please have a look in your wp-config.php and also check the followings to make sure that configuration is correct. 1- /** MySQL hostname */ define(‘DB_HOST’, ‘localhost’); :: Normally this constant remain as it is as localhost, make sure […]