Blackout Posted July 6, 2008 Report Share Posted July 6, 2008 Uzreiz atvainojos par to, ka nerakstu ar garumziimeem un miikstinaajumiem, uz datora no kura rakstu nav latvieshu valodas. Nu tad kersimies klaat! Lieta taada, man ir mysql tabula ar informaaciju, pienjemsim, par preceem. Man ir viena liela tabula(<table>), ar 3 kolonnaam un 3 rindaam, katraa kollonaa ir jaaizvada, pienjemsim, viena prece un jaaizdara taa lai es varu to visu daliit pa lapuseem.. Kaa ir jaaizlabo shis querijs lai mainot lapaspusi mainiitos izvadiitie dati no datubaazes? $result = mysql_query("SELECT * from katalog LIMIT 9"); do { print ////////Sheit informaacijas izvade } while ($katalogq = mysql_fetch_array($result)); Un kaa pareizaak ir jaaraksta print dalju lai buutu pienjemsim taa: <table parampamap> <tr> <td>Pirmaa prece</td> <td>Otraa prece</td> <td>Treshaa prece</td> </tr> <tr> <td>Ceturtaa</td> <td>Piektaa</td> <td>sestaa</td> </tr> Un taa taalaak </table> Luudzu nesodiet stipri un nesuutiet uzreiz uz googli, taa jau rokos, neko labu nevaru atrast! Link to comment Share on other sites More sharing options...
Val Posted July 6, 2008 Report Share Posted July 6, 2008 http://php.lv/f/index.php?showtopic=2935 ctrl+f ierakstu dalīšana Link to comment Share on other sites More sharing options...
Blackout Posted July 6, 2008 Author Report Share Posted July 6, 2008 ar limit laikam sapratu.. $result = mysql_query("SELECT * from katalog LIMIT 9, 9"); tas izdos datus sākot no 10 līdz 18, ja es pareizi sapratu? Un tad no LIMIT 18, 9 Izdos nākamos 9? Paldies! Šito laikam tad sapratu.. Bet kā man ar tām tabulas kolonnām.. Būs laikam jātaisa 3 queriji katram tabulas rowam.. Vai arī to var izdarīt kautkā vienkāršāk? P.s. beidzot sataisiju datoram valodu.. ;) Link to comment Share on other sites More sharing options...
Val Posted July 6, 2008 Report Share Posted July 6, 2008 (edited) $q = mysql_query("select k1, k2, k3 from blabla limit utt"); if(mysql_num_row($q)>0) { echo '<table>'; while($r=mysql_fetch_array($q)) { $k1 = $r['k1']; //utt. echo "<tr><td>$k1</td><td>$k2</td><td>$k3</td></tr>"; }; echo '</table>'; }; Edited July 6, 2008 by Val Link to comment Share on other sites More sharing options...
Blackout Posted July 6, 2008 Author Report Share Posted July 6, 2008 Lielas paldies! Apmeeram uzvedi mani uz pareizaas domas.. ;) Link to comment Share on other sites More sharing options...
Recommended Posts