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 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. Link to comment https://forums.phpfreaks.com/topic/192663-switchcase-and-sql-query/#findComment-1014991 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.