List:General Discussion« Previous MessageNext Message »
From:Barry Date:March 27 2006 2:48pm
Subject:Complicated select query
View as plain text  
Hello Everyone!

Probably somone can help me out.

I have 2 databases and it looks like:
db1 Project 1
   db2 Subproject 1
   db2 Subproject 2
db1 Project 2
   db2 Subproject 1
db1 Project 3
   db2 Subproject 1
   db2 Subproject 2
   db2 Subproject 3

What kind of a query would give me the first Subproject out of dv2 of 
each Project in db1?

And er is it possible to have loops in mysql?

Like
SELECT * FROM db WHERE id = 5 STEP id +5 UNTIL id = 50
+--+---+
|id|val|
+--+---+
|5 |10 |
|10|xy |
|15|jks|
...
...
|50|763|
+--+---+

and so on.

Thanks for any Help!

Greets
	Barry

-- 
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)
Thread
Complicated select queryBarry27 Mar
  • Re: Complicated select queryGabriel PREDA27 Mar
    • Re: Complicated select queryBarry28 Mar
      • Re: Complicated select queryBarry28 Mar
      • Re: Complicated select queryPure Web Solution28 Mar
  • Re: Complicated select queryPeter Brawley27 Mar