Jump to content
php.lv forumi

Recommended Posts

Posted

Sveiki, pieņemu ka ir jālieto kaut kāds joins, bet man ar joiniem ir problēmas, varbūt variet uzrakstīt.

 

tabula 1

c_id,c_title,c_user

tabula 2

c_id,c_clicks,c_visits

 

gribu lai "Select * from tabula1 order by (tabula2.c_clicks+tabula2.visits)"

Posted

SELECT * FROM tabula1 LEFT JOIN tabula2 ON tabula_1.c_id = tabula2.c_id ORDER BY (tabula2.c_clicks + tabula2.c_visits); -- Nezinu, gan vai pēc lauks1+lauks2 var kārtot.

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