# Php-mysql: query with 2 'Where's on the same column?

**URL:** <https://forum.kirupa.com/t/php-mysql-query-with-2-wheres-on-the-same-column/290207>\
**Category:** Uncategorized\
**Created:** [June 11, 2009, 9:06am UTC](https://forum.kirupa.com/t/php-mysql-query-with-2-wheres-on-the-same-column/290207 "2009-06-11T09:06:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eyebum](https://avatars.discourse-cdn.com/v4/letter/e/e495f1/32.png) [@eyebum](https://forum.kirupa.com/u/eyebum)\
**Post date:** [June 11, 2009, 9:06am UTC](https://forum.kirupa.com/t/php-mysql-query-with-2-wheres-on-the-same-column/290207/1 "2009-06-11T09:06:45Z")

</div>

Hey there,  
Anyone know if it is possible to make a query function with multiple WHERE clauses that reference the same column?  
I have no problem with multiple WHERE clauses referencing different columns, but my query fails when I add in that duplicate reference…Here’s some code:

```php

$result = mysql_query("select * from {$table} WHERE Registration.Division = '$Division' && Registration.Division = 'Open' && Event = '$Event' ORDER BY Rorder ASC"); 

```

Maybe I am using the wrong syntax. But if I drop that second reference to ‘Registration.Division’, it works fine.  
But of course, I need it!

Thanks,

Chris
