mysql WHERE condition execution

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Branko

    #1

    mysql WHERE condition execution

    Hello all,

    I have 2 columns and I search rows with two conditions.

    SELECT * FROM table WHERE A = '$a' AND B = '$b'

    How can I make mysql search columns with A condition first and after
    that within these condition B.

    I would like to know, how mysql search works.
    How can I tell mysql how to search?

    Thanks,
  • David Brown

    #2
    Re: mysql WHERE condition execution

    "Branko" <branko@email.c om> wrote in message
    news:c5f9e150.0 310171210.de072 de@posting.goog le.com...[color=blue]
    > SELECT * FROM table WHERE A = '$a' AND B = '$b'
    >
    > How can I make mysql search columns with A condition first and after
    > that within these condition B.[/color]

    SELECT * FROM table WHERE A = '$a' AND B = '$b' ORDER BY A

    Regards,
    Dave.


    Comment

    • David Brown

      #3
      Re: mysql WHERE condition execution

      "Branko" <branko@email.c om> wrote in message
      news:c5f9e150.0 310171210.de072 de@posting.goog le.com...[color=blue]
      > SELECT * FROM table WHERE A = '$a' AND B = '$b'
      >
      > How can I make mysql search columns with A condition first and after
      > that within these condition B.[/color]

      SELECT * FROM table WHERE A = '$a' AND B = '$b' ORDER BY A

      Regards,
      Dave.


      Comment

      Working...