Jump to content
php.lv forumi

Neizprotama join darbība


Wuu

Recommended Posts

$result = mysql_query('
select t1.message,t1.addtime,t2.members_display_name,t3.avatar_location,t1.id 
from comments t1 
join '.$INFO['sql_tbl_prefix'].'members t2 
join '.$INFO['sql_tbl_prefix'].'member_extra t3 
on (t1.uid = t2.id && t1.uid = t3.id)  
where t1.link = '.$id.' && (t1.type = 2 || t1.type = 9) 
order by t1.id asc');

 

Šis kods pareizi strādā ,bet vēlos lai izvada vel pie normālā koda arī t1.type = 9 ,kuru ierakstus nevajag joinot ,bet vienkārši izvadīt t1.message,t1.addtime

Link to comment
Share on other sites

  • 3 weeks later...

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...