cdinca Posted February 19, 2010 Share Posted February 19, 2010 I can't get the switch case value into my sql query...don't get why. if($_GET['showme']){ $whichdoc=$_GET['showme']; } else { $whichdoc="firstdoc"; } switch ($whichdoc){ case "firstdoc": $myquery="SELECT blah blah blah"; break; case "seconddoc": $myquery="SELECT blah blah blah"; break; this always ends up giving an empty query. However if I make my first line $whichdoc="firstdoc"; I think this must have something to do with execution order, but I don't know what is going on. Help Please Quote Link to comment https://forums.phpfreaks.com/topic/192663-switchcase-and-sql-query/ Share on other sites More sharing options...
cdinca Posted February 19, 2010 Author Share Posted February 19, 2010 This is a non-issue! Typo error on my part...very sorry. Quote Link to comment https://forums.phpfreaks.com/topic/192663-switchcase-and-sql-query/#findComment-1014991 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.