seetnieks_uz_lapu_kaudzes Posted January 3, 2006 Report Share Posted January 3, 2006 ir skripts: if ('monthly' == $type) { $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts WHERE post_date < '$now' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC" . $limit); if ($arcresults) { $afterafter = $after; foreach ($arcresults as $arcresult) { $url = get_month_link($arcresult->year, $arcresult->month); $text = sprintf('%s/%d', $arcresult->month, $arcresult->year); } echo get_archives_link($url, $text, $format, $before, $after); } } un rezultaataa links: 1/2006 kaa sheit dabuut, lai meeneshiem buutu nulles? lai buutu 01/2006 Link to comment Share on other sites More sharing options...
Delfins Posted January 3, 2006 Report Share Posted January 3, 2006 sprintf( '%02s%d', ... ) Link to comment Share on other sites More sharing options...
seetnieks_uz_lapu_kaudzes Posted January 3, 2006 Author Report Share Posted January 3, 2006 sprintf( '%02s%d', ... ) tik vienkaarshi, ja zin. paldies, Delfins! tagad viss darbojas kaa vajag. Link to comment Share on other sites More sharing options...
rpr Posted January 3, 2006 Report Share Posted January 3, 2006 es buutu izmantojis sql funkciju. mysql gadiijumaa taa ir date_format(post_date, 'M/Y'). Link to comment Share on other sites More sharing options...
Grey_Wolf Posted January 3, 2006 Report Share Posted January 3, 2006 (edited) rpr--> pilniigi piekriitu :) DATE_FORMAT() ljauj ar vienu panjeemienu ieguut pilniigi noformateetu stringu :) Te ir tabuljina piedevaam vari likt starpaa savu tekstu :) taa kaa pilna izveeles iespeeja :) edit: tev tur neprecizitaate... (aizmirsies % ) date_format(post_date, '%M/%Y') Edited January 3, 2006 by Grey_Wolf Link to comment Share on other sites More sharing options...
Recommended Posts