All posts by Altmanadmin

Sticky nav and ad above it scrolling setup

If you have a sticky navigation for you website and like to add an ad above it where sticky navigation will show under the ad and when you start scrolling it will move up until navigation is at the top and stick after that.

This is what you need to do.

Make sure you have jquery on your site.

$(document).ready(function() {
//Find the height of the ad
var adh = $('#ad_ID').height();
$(window).scroll(function () {
if ($(window).scrollTop() > adh) {
if ($(window).scrollTop() < adh) { $('#nav_ID').removeClass('nav-fixed-class'); } }); });

MySql Backup Database with mysqldump

To backup MySql Database from command line.

mysqldump -u user_name -p Database_Name > backup-file.sql

In windows xp, 7, or 8 simply run the above command in CMD. It will place the backup-file.sql in the same direcotry where you run the command from.

for more information look at mysqldump

MySql view database list, switch database and list tables

If you are running MySql form command line and you like to see list of all the database then simply run this command after login to the mysql

show databases;

this command will list all the database that are on MySql server.

If you like to work with one of the database then you can select the database with.

use database_name;

Once in the Database you like to see the list of the table use.

show tables;

This command will show the list of all the tables in that database.

Login to MySql database form command line

To login to MySql database from a commend line you can use

mysql -u root -p;

after hitting enter system will ask you for the password or you can use this command

mysql -u root -pPassword;

Once login to the database you have to select the database to work with.

How to turn on or off full text indexing in MS SQL server with sp_fulltext_database

Here is the snytax for it.

sp_fulltext_database [@action=] ‘action’

action is an argument and it’s type of varchar(20) and it could be enable or disable

To turn on full text indexing in MS SQL server with sp_fulltext_database try this.