Jump to content
php.lv forumi

Kartošana


airbus

Recommended Posts

Kā šajā selektošanas skriptā uzlikt lai viņš jaunākos liek aukšā, bet vēcakos zemē.

 

<?php
$con = mysql_connect("localhost","root","assa");
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }

mysql_select_db("eh", $con);

$result = mysql_query("SELECT * FROM Chat");

while($row = mysql_fetch_array($result))
 {
 echo "<div style='border: 1px solid rgb(221, 221, 221); -moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomright: 3px;'>
<div style='margin: 1px; padding: 5px; background: rgb(238, 238, 238) none repeat scroll 0pt 0pt; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;'>
<div><b>";
 echo $row['niks'];
 echo "</b> - "; 
 echo $row['laiks'];
 echo "</div></div>";
 echo "<div style='border-top: 1px solid rgb(221, 221, 221); padding: 3px; margin-top: 1px;'>
<p>";
 echo $row['texts'];
 echo "</p></div></div><br>";
 }

mysql_close($con);
?>

Edited by airbus
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...