tk1 Posted December 3, 2006 Report Share Posted December 3, 2006 Nu tā! man ir kods kas izvada no mysql piemeram 30 pirmos ierakstuts man vajadzētu tā lai apakšā pēc tiem 30 uztaisitu linku un vinjs butu uz nakošajiem 30 bet man neaiziet ka to dabūt gatavu! kods <?php // Connecting, selecting database $link = mysql_connect('localhost', 'root', 'parole') or die('Could not connect: ' . mysql_error()); echo '30 Jaunakas PS pamacibas :'; mysql_select_db('pm') or die('Could not select database'); // Performing SQL query $query = 'SELECT `pamaciba` FROM `pamacibam` LIMIT 0, 30'; $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...
andrisp Posted December 3, 2006 Report Share Posted December 3, 2006 Šeit forumā tas ir apspriests n-tās reizes. Vēl nesen topiki ir bijuši ar šo saistībā. Enīvei, - Parasta matemātika, - SELECT ... LIMIT 0, 30, SELECT ... LIMIT 30, 60 utt. Link to comment Share on other sites More sharing options...
tk1 Posted December 3, 2006 Author Report Share Posted December 3, 2006 paldies :) Link to comment Share on other sites More sharing options...
Recommended Posts