sandis_m Posted December 14, 2009 Report Share Posted December 14, 2009 (edited) Bija taada doma uztaisiit chatu... tabulas: USERS: id username firstname lastname CHAT: chid chtime chsaid <?php $chads = "SELECT * FROM users JOIN chat ON users.id=chat.chid"; //probleema shite $chadrez = mysql_query($chads) or die(mysql_error()); while($row = mysql_fetch_array($chadrez)){ echo $row['username']. " - ". $row['chsaid']; echo "<br />"; } ?> nesaprotu...o tajaa querijaa rakstiit... googlee jau mekleeju neko saprotamu neatradu Edited December 14, 2009 by who_i_am Quote Link to comment Share on other sites More sharing options...
false Posted December 14, 2009 Report Share Posted December 14, 2009 <? $sql = mysql_query("SELECT * FROM tabula") or die(mysql_error()); while($row = mysql_fetch_array($sql)){ echo "".$row['username']." - ".$row['chsaid']."<br/>"; } ?> Quote Link to comment Share on other sites More sharing options...
anonīms Posted December 14, 2009 Report Share Posted December 14, 2009 select t1.username as username, t2.chsaid as chsaid from USERS as t1, CHAT as t2 WHERE t1.username = t2.chid un tad izvani username & chsaid Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.