This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DISTINCT (c1.id), c1 . * FROM cm_service_CAF c1 LEFT OUTER JOIN cm_service_CAF c2 ON c2.id != c1.id AND c2.CODGEO = c1.CODGEO WHERE c2.id IS NOT NULL | |
| ### Plus rapide | |
| SELECT COUNT(*) AS nbr_doublon, identifiant FROM cm_users GROUP BY identifiant HAVING COUNT(*) > 1 | |
| #delete | |
| ALTER IGNORE TABLE cm_dvfdatas | |
| ADD UNIQUE INDEX CODGEO (CODGEO); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $querystr2 = " | |
| SELECT pm1.post_id AS post_id, pm1.meta_value AS meta_value1, pm2.meta_value AS meta_value2, pm3.meta_value AS meta_value3, pm4.meta_value AS meta_value4 | |
| FROM wp_postmeta pm1 | |
| LEFT JOIN $wpdb->postmeta pm2 | |
| ON pm1.post_id = pm2.post_id | |
| LEFT JOIN $wpdb->postmeta pm3 | |
| ON pm2.post_id = pm3.post_id | |
| LEFT JOIN $wpdb->postmeta pm4 | |
| ON pm3.post_id = pm4.post_id | |
| WHERE pm1.post_id= $post_idval |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Export csv | |
| SELECT order_id,product_name,qty | |
| FROM orders | |
| INTO OUTFILE '/tmp/orders.csv' | |
| FIELDS TERMINATED BY ',' | |
| ENCLOSED BY '"' | |
| LINES TERMINATED BY '\n' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grep -r "social.png" * | |
| #recherche d'un fichier sur tout le serveur | |
| find / -name gpu.mbtiles | |
| #sans les lignes | |
| grep -lr "simplexml_load_file" * | |
| grep -lr "} ?>" * | |
| #sans le path du fichier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo '{"lastcode":'; | |
| $rows = array(); | |
| foreach( $result2 as $var2){ | |
| $var2['datejson'] = $date; | |
| //$rows[] = array_map('utf8_encode', $var2); | |
| $rows[] = $var2; | |
| } | |
| echo json_encode($rows); | |
| echo '}'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global $arrayliste; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function aasort (&$array, $key) { | |
| $sorter=array(); | |
| $ret=array(); | |
| reset($array); | |
| foreach ($array as $ii => $va) { | |
| $sorter[$ii]=$va[$key]; | |
| } | |
| asort($sorter); | |
| foreach ($sorter as $ii => $va) { | |
| $ret[$ii]=$array[$ii]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $reversed = array_reverse($input); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $content = ""; | |
| $content = preg_replace('/\n\r|\r\n|\n|\r/','', $content); | |
| $content = preg_replace('/\s+/', ' ',$content); | |
| $content = preg_replace('/<br \/><br\/><br\/><br\/> /',' ', $content); | |
| $content = str_replace(' ','',$content); | |
| $content = str_replace(''','\'',$content); | |
| $content = str_replace('à','à',$content); | |
| $content = str_replace('é','é',$content); | |
| $content = preg_replace('/\n\r|\r\n|\n|\r/','', $content); |