How to correctly add JQuery in a WP theme?

When you register/enqueue your other scripts, simply pass jQuery as the third parameter and it will be loaded first and only once, from the local WordPress files:

wp_register_script( 'theme-js', get_template_directory_uri() . '/js/theme.js', array( 'jquery') );

If you only need the jQuery, simply use:

wp_enqueue_script('jquery');

You can find a list here about the javascript libraries that are included in your default WordPress site:

http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_Scripts_Included_and_Registered_by_WordPress

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)