Jump to content

haribo83

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

haribo83's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Have solved it I assigned the All in the list a value of 0 - don't know if it is best practice but have done the following: if ( $listoption == 0 ) { $query = "SELECT * from details";; } else { $query = "SELECT * from details WHERE otype = '$listoption'";; }
  2. I have a list that passes values to an sql statement to show relevant results. I have three options (All, Option One, Option Two) and cannot get the query to work. If I choose option one or option two then the results are fine but I cannot find a way to display all results. The code is below: SELECT * from details WHERE otype = '$listoption' Any help would be great.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.