goma smile Posted November 14, 2008 Report Share Posted November 14, 2008 (edited) ka uztaisit vai ka sauc .. Man ir uztaisita taka top sistema uz cilvekiem kas taisijusi foruma topicu man tadu ir pavisam ~ 200 vins rada protams kurs vairak uztaisijis tas pacelas augstak un ka var izdarit lai pie litotaj varda rada ranka skaitli piemeram 1. [GOMA] smile 9 2. asdas 8 3. dsafff 1 uttt 3.4.5.6.7.8.9..... Edited November 14, 2008 by goma smile Link to comment Share on other sites More sharing options...
bubu Posted November 14, 2008 Report Share Posted November 14, 2008 Skaitļus, tāpat kā stringus, php var izvadīt ar echo: $i = 10; echo $i; // izvadīs 10 Link to comment Share on other sites More sharing options...
goma smile Posted November 14, 2008 Author Report Share Posted November 14, 2008 Ta es mazliet nesaprotu :D Link to comment Share on other sites More sharing options...
Pentiums Posted November 15, 2008 Report Share Posted November 15, 2008 (edited) nu ja velc no datubāzes tad $result = mysql_query("SELECT * FROM tabula LIMIT 10") or die(mysql_error()); $i = 1; while($row = mysql_fetch_array( $result )) { echo $i.'Te lietotājs'; $i++ } Edited November 15, 2008 by Pentiums Link to comment Share on other sites More sharing options...
andrisp Posted November 15, 2008 Report Share Posted November 15, 2008 Šajā gadījumā var arī mēģināt izlīdzēties ar <ol> elementu. Link to comment Share on other sites More sharing options...
goma smile Posted November 15, 2008 Author Report Share Posted November 15, 2008 Ja sis iet a man ir sadalijums pa lapam un ka parmainu nakamo lapu vins atkal sak no 1 :( Link to comment Share on other sites More sharing options...
marcis Posted November 16, 2008 Report Share Posted November 16, 2008 (edited) Sāc skaitīt no cipara ar kuru sākas limits (7dienas nakts nesakarīgums). Pieņemot, ka lapā tu rādi 10 ierakstus: <? $limit=10; // ierakstu skaits vienā lapā $page=(!empty($_GET['page']) && $_GET['page']>1)?$_GET['page']:1; $start=$limit*$page-$limit; ... while(...){ echo ++$start; } ?> Edited November 16, 2008 by marcis Link to comment Share on other sites More sharing options...
goma smile Posted November 16, 2008 Author Report Share Posted November 16, 2008 (edited) Liels paldies !!! es zinaju ka vaig formulu tikai nezinaju kadu :D Edited November 16, 2008 by goma smile Link to comment Share on other sites More sharing options...
goma smile Posted November 16, 2008 Author Report Share Posted November 16, 2008 Runajot pa pasu topu ja piemeram ir vairaki vienadi id un vairakas vietas ir vini piemeram , ka var saskaitit lai raditos kopa ? Link to comment Share on other sites More sharing options...
marcis Posted November 16, 2008 Report Share Posted November 16, 2008 SELECT COUNT(id) FROM `table` GROUP BY id Link to comment Share on other sites More sharing options...
Recommended Posts