tk1 Posted September 7, 2006 Report Share Posted September 7, 2006 Nu man vajadzetu no sava mysql db regi table accontss izvadit infu, pedejos 10 ierakstus! vai tas ir iespejams?? Kads butu kods?? Link to comment Share on other sites More sharing options...
Blitz Posted September 7, 2006 Report Share Posted September 7, 2006 ORDER BY DATUMS DESC LIMIT 10 Link to comment Share on other sites More sharing options...
tk1 Posted September 7, 2006 Author Report Share Posted September 7, 2006 kodu nevar pateikt plizzz =] Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 7, 2006 Report Share Posted September 7, 2006 kodu nevar pateikt plizzz =] RTFM..... TEv deva Atbildi kaadam jaabuut Querija nobeigumam... Par PHP darbu Ar MYSQl lasi manuaali !!!! Link to comment Share on other sites More sharing options...
AcidRain Posted September 7, 2006 Report Share Posted September 7, 2006 Rekur kods: <?php // Connecting, selecting database $link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password') or die('Could not connect: ' . mysql_error()); echo 'Connected successfully'; mysql_select_db('my_database') or die('Could not select database'); // Performing SQL query $query = 'SELECT * FROM accontss ORDER BY datums DESC LIMIT 10'; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); // Printing results in HTML echo "<table>\n"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "\t<tr>\n"; foreach ($line as $col_value) { echo "\t\t<td>$col_value</td>\n"; } echo "\t</tr>\n"; } echo "</table>\n"; // Free resultset mysql_free_result($result); // Closing connection mysql_close($link); ?> Link to comment Share on other sites More sharing options...
tk1 Posted September 7, 2006 Author Report Share Posted September 7, 2006 (edited) Amm paskaidrosu visu pareizi situacija ir tada Datu baze reg ir tabula acces tur ir id username pass utt man vajag izvadit no turienes pedejos 10 ieliktos username :\ ka lai so dabujn gatavu kads varetu palidzet?? Busu tiesam pateicigs :) Edited September 8, 2006 by tk1 Link to comment Share on other sites More sharing options...
Recommended Posts