0

I wonder is it possible to use the $get value in several places in a query?

The $value is originally a timestamp that is used like this:

 ho.time BETWEEN ? AND ?

I want to add the value to another column, but is this possible?

ho.send BETWEEN ? AND ?

I tried:

  1. ho.time,ho.send BETWEEN ? AND ?

  2. (ho.time,ho.send) BETWEEN ? AND ?

  3. ho.time BETWEEN ? AND ?

    ho.send BETWEEN ? AND ?

But don't get it to work with more than one.

Community
  • 1
  • 1
Slistryko
  • 61
  • 5

1 Answers1

0

Your SQL is wrong

Try this.

SELECT * FROM table WHERE (x BETWEEN 20 AND 80) AND (y BETWEEN 20 AND 120) AND (z BETWEEN 10 AND 40) LIMIT 0 , 30

Found here

Community
  • 1
  • 1
ninchen
  • 71
  • 7