I'm trying to modify an existing script I have, that will only output rows that contain specific area codes to users that have be assigned the specific area codes.

Example:

A column named designed\_areas in the users table will contain different data like: CM,SS,RH

When a lead comes in, I'm using substr to detect the first 2 characters of a post code. 

```
$trimmed = substr("$postcode", 0, 2);

$viewLeads=mysqli_query($con,"SELECT * FROM leads WHERE team = '$getID->team' ORDER BY id DESC");

while($lead=mysqli_fetch_object($viewLeads)){

```

I'd like to expand on the mysqli\_query and select all the leads from the database where the first 2 characters of the postcode matches any of users designated\_areas.. which are comma seperated. 

This way, he'll only see leads with the areas he can work on.

Can anyone help?