Jump to content
php.lv forumi

nolasa no divām tabilām


ziedinjsh

Recommended Posts

Zinu, ka nav kaut kas pareizi.. vai nekas nav pareizi, bet meiģināju kko..

 

$talk=mysql_query("SELECT AS id, talk_message, time FROM talk LEFT JOIN SELECT user_name, user_photo FROM users GROUP BY id");
while($data = mysql_fetch_array( $talk )){ 

echo "<div class='talk-messages'>";
echo "<div class=''>".$data['talk_message']."</div>";
echo "<div class=''>".$data['user_photo']."</div>";
echo "<div class=''>".$data['user_name']."</div>";

echo "</div>";

}

 

protams jau neko nenolasa.. tikai izmet erroru:

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in D:\WEB\xampp\htdocs\forums\index.php on line 60

Link to comment
Share on other sites

Centies darīt šādi...

 

mysql_query( ... ) or exit( mysql_error() );

 

P.S. Protams, kad lapa ir gatava, potencionālais lietotājs nedrīkst redzēt nekādus "error'us", jo hakerim (kas ir potencionālais lietotājs) tas atvieglos lapas "izvarošanu".

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...