Månedsarkiv: december 2004

Mysql backup

to dump all databases from remote host: mysqldump -aAcQl –add-drop-table –default-character-set=danish -h 10.0.181.249 -p > dump_tir.sql to import the dum to ‘remote’ host: mysql –default-character-set=danish -h 127.0.0.1 -p < dump_tir.sql change default charset if necessary to dump any specific db: … Læs resten

Udgivet i Knowledge Base, Mysql | Skriv en kommentar

Nyttige PHP funktioner

5 function eng2dan($ls,$string) 6 { 7 $da_mon_long=array(“Januar”,”Februar”,”Marts”,”April”,”Maj”,”Juni”,”Juli”,”August”,”September”,”Oktober”,”November”,”December”); 8 $da_mon_short=array(“Jan”,”Feb”,”Mar”,”Apr”,”Maj”,”Jun”,”Jul”,”Aug”,”Sep”,”Okt”,”Nov”,”Dec”); 9 10 $da_day_long=array(“Mandag”,”Tirsdag”,”Onsdag”,”Torsdag”,”Fredag”,”Lørdag”,”Søndag”); 11 $da_day_short=array(“Man”,”Tir”,”Ons”,”Tor”,”Fre”,”Lør”,”Søn”); 12 13 for ($i=0; $i<7; $i++) { $eng_days[]=date(“D”,(24*60*60)*(4+$i)); } 14 for ($i=0; $i<12; $i++) { $eng_month[]=date(“M”,(24*60*60*31)*($i)); } 15 16 if ($ls == “long”) 17 { return … Læs resten

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar