Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
MySQL :(

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
i72852



Joined: 25 Feb 2004
Posts: 81

PostPosted: 07.07.2006 21:20    Post subject: MySQL :( Add user to your forum ignore list Reply with quote

imam 2 tablice koje su identicne.. (id, txt, br)
e i sad bi ja iz te dvije htio izvuc 10 podataka koji su sortirani silazno po br... znam kak to izvuc iz svake posebno, ali neznam kak ih spojiti i onda izvuc...

ima tko ideju?
Back to top
View user's profile Send private message Visit poster's website
carr



Joined: 13 Nov 2003
Posts: 1397
Location: Karlovac

PostPosted: 07.07.2006 22:05    Post subject: Re: MySQL :( Add user to your forum ignore list Reply with quote

i72852 wrote:
imam 2 tablice koje su identicne.. (id, txt, br)
e i sad bi ja iz te dvije htio izvuc 10 podataka koji su sortirani silazno po br... znam kak to izvuc iz svake posebno, ali neznam kak ih spojiti i onda izvuc...

ima tko ideju?

trebaju ti subqueries i UNION:
Code:
SELECT * FROM(
SELECT id,txt,br FROM tablicaA
UNION
SELECT id,txt,br FROM tablicaB
) as C ORDER BY br DESC

_________________
Bolje biti malo lud, nego malo pametan.
Back to top
View user's profile Send private message Visit poster's website
i72852



Joined: 25 Feb 2004
Posts: 81

PostPosted: 07.07.2006 22:55    Post subject: Re: MySQL :( Add user to your forum ignore list Reply with quote

carr wrote:
trebaju ti subqueries i UNION:
Code:
SELECT * FROM(
SELECT id,txt,br FROM tablicaA
UNION
SELECT id,txt,br FROM tablicaB
) as C ORDER BY br DESC

ma to carr-e... Very Happy
Puno hvala...
Back to top
View user's profile Send private message Visit poster's website
ON AIR
Guest





PostPosted: 08.07.2006 00:11    Post subject: Re: MySQL :( Reply with quote

i72852 wrote:
carr wrote:
trebaju ti subqueries i UNION:
Code:
SELECT * FROM(
SELECT id,txt,br FROM tablicaA
UNION
SELECT id,txt,br FROM tablicaB
) as C ORDER BY br DESC

ma to carr-e... Very Happy
Puno hvala...
Back to top
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group