pakai ssh
instruksi :
To disable DNS recursion:
nano -w /var/named/chroot/etc/named.conf
Add the following text at the end of this file:
options {
recursion no;
};
then restart the named service (service named restart)
Sunday, October 13, 2013
Tuesday, October 8, 2013
menghapus duplicate row di sql menggunakan excel
expor dulu table ke dalam format xls(ada di menu export phpmyadmin)
lalu buka file export dngn excel.
lakukan tips ini :
lalu buka file export dngn excel.
lakukan tips ini :
- Select all the rows, including the column headers, in the list you want to filter.
Tip
- On the Data menu, point to Filter, and then click Advanced Filter.
- In the Advanced Filter dialog box, click Filter the list, in place.
- Select the Unique records only check box, and then click OK.
The filtered list is displayed and the duplicate rows are hidden.
- On the Edit menu, click Office Clipboard.
The Clipboard task pane is displayed.
- Make sure the filtered list is still selected, and then click Copy .
The filtered list is highlighted with bounding outlines and the selection appears as an item at the top of the Clipboard.
- On the Data menu, point to Filter, and then click Show All.
The original list is re-displayed.
- Press the DELETE key.
The original list is deleted.
- In the Clipboard, click on the filtered list item.
The filtered list appears in the same location as the original list.
mengatasi error Duplicate entry '1' for key 1
misal perintah sql :
INSERT INTO mobiware2 (idkw, kw) VALUES
(1, ' how to turn off facebook contacts on a samsung galaxy 3'),
padahal di table sudah terdapat idkw 1 maka error error Duplicate entry '1' for key 1 akan muncul
cara mengatasi :
INSERT INTO mobiware2 (idkw, kw) VALUES
(null, ' how to turn off facebook contacts on a samsung galaxy 3'),
null akan menjadi id secara otomatis di idkw paling ahir alias auto increment.
INSERT INTO mobiware2 (idkw, kw) VALUES
(1, ' how to turn off facebook contacts on a samsung galaxy 3'),
padahal di table sudah terdapat idkw 1 maka error error Duplicate entry '1' for key 1 akan muncul
cara mengatasi :
INSERT INTO mobiware2 (idkw, kw) VALUES
(null, ' how to turn off facebook contacts on a samsung galaxy 3'),
null akan menjadi id secara otomatis di idkw paling ahir alias auto increment.
tampilkan random search term stt2 terbaru
tambahkan fungsi untuk tampilkan random search term stt2 terbaru :
function stt_rand_terms($count=10){
global $wpdb;
$start_time = round(microtime(),3);
$options = get_option('pk_stt2_settings');
$sql = "SELECT `meta_value`,`meta_count`,`post_id` FROM `".$wpdb->prefix."stt2_meta` ORDER BY RAND() LIMIT ".$count.";";
$searchterms = $wpdb->get_results($sql);
if(!empty($searchterms)) {
$result = pk_print_searchterms($searchterms,$options);
return $result;
} else {
return false;
}
}
lalu pasang di widget :
<?php if(function_exists('stt_rand_terms')) echo stt_rand_terms(10) ;?>
function stt_rand_terms($count=10){
global $wpdb;
$start_time = round(microtime(),3);
$options = get_option('pk_stt2_settings');
$sql = "SELECT `meta_value`,`meta_count`,`post_id` FROM `".$wpdb->prefix."stt2_meta` ORDER BY RAND() LIMIT ".$count.";";
$searchterms = $wpdb->get_results($sql);
if(!empty($searchterms)) {
$result = pk_print_searchterms($searchterms,$options);
return $result;
} else {
return false;
}
}
lalu pasang di widget :
<?php if(function_exists('stt_rand_terms')) echo stt_rand_terms(10) ;?>
Subscribe to:
Comments (Atom)