> The code below doesn't work properly but kind of illustrates what I'm > trying to do here. In this particular query, I'm trying to limit > access to what might be viewed in the table for 'hardware', so even > though there might be 5 total hardware types listed in the table, the > user would only be able to query 'nuts' OR 'bolts' separately or > 'Both'. In this query they wouldn't have access to 'All' where if > they did, might see 'screws', 'washers', or 'anchors' too. Can anyone > help? > thanks, > john > > $query = > "SELECT * > FROM $table "; > if($source != "All") $query .= "and source = '".$source."'"; > if($hardware != "Both") $query .= "and hardware = '".$hardware."'"; > if($plant != "All") $query .= "and plant = '".$plant."'"; > if($area != "All") $query .= "and area = '".$area."'"; > > $result = mysql_query($query);
There's no "WHERE" clause. -D. Israel [EMAIL PROTECTED] http://www.customcodebydan.com AIM: JudoDanIzz ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
