Drop-down select issue

Hi, can anyone tell me why $pidgroup (below) will only work when it’s an integer and it won’t work with varchar?

for example , it works if groupid = 9600
But won’t work if groupid = red group

Thanks much to anyone who can help!

<form method="post">
<select onchange="this.form.submit();">   
<option value="nothing">Select</option>
<?php $Users=mysql_query( "SELECT * FROM " . $table_customer . " WHERE groupid = $pidgroup");
if(isset($Users)) { if(mysql_num_rows($Users)>0){ while($us=mysql_fetch_array ($Users)){
$sel="";
if ($us['id']==$customer_id)
$sel='selected="selected"';
echo '<option value="' . $us['id'] .'"' .$sel .' >'.$us['first_name']." ".$us['last_name']."</option>";
}}}

?>
</select>
</form>

Issue solved!
This works!

$Users=mysql_query( “SELECT * FROM " . $table_customer . " WHERE groupid = '” . $pidgroup . "’ ")