Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORDER #88

Open
FairPrice opened this issue Oct 18, 2012 · 3 comments
Open

ORDER #88

FairPrice opened this issue Oct 18, 2012 · 3 comments
Labels

Comments

@FairPrice
Copy link

How can you do it using the handler
SELECT t.name, p.suma FROM tovar t, price p WHERE t.id=2 ORDER BY p.suma DESC

@nijikon
Copy link

nijikon commented Oct 18, 2012

What's the output of this query?

@FairPrice
Copy link
Author

Bring the record is initially sorted

@iperevozchikov
Copy link

HandlerSocket (HS) technology not support multiquering such as any possible JOIN or SELECT FROM multiple tables.
For correctly use HS you must split your query to N single queries.
In your situation you can use as:

  1. SELECT name FROM tovar WHERE id=2;
  2. SELECT suma FROM price WHERE id < {BIG_INT} AND tovar_id = {id};

PS. Construction like key < {BIG_INT} - will be ORDER rows in DESC direction and of course > {BIG_INT} will be ORDER ASC.

@ahiguti ahiguti added the info label Mar 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants