# Mysql/php: select where id \<\> #?

**URL:** <https://forum.kirupa.com/t/mysql-php-select-where-id/174131>\
**Category:** Uncategorized\
**Created:** [January 3, 2006, 5:00am UTC](https://forum.kirupa.com/t/mysql-php-select-where-id/174131 "2006-01-03T05:00:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FreakSheep](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@FreakSheep](https://forum.kirupa.com/u/FreakSheep)\
**Post date:** [January 3, 2006, 5:00am UTC](https://forum.kirupa.com/t/mysql-php-select-where-id/174131/1 "2006-01-03T05:00:05Z")

</div>

Ok, I need to select a row(or site) from the db that the user has not seen that day. I know how to do everything else, but i’m stuck on how to select the site.

I have all the sites seen by the user stored in a table called ‘traffic’, so i have which site the user has seen, but how to i choose the sites the user hasnt seen? would i loop the “id \<\> 0 AND” part? or should i use php to find the sites the user hasnt seen.

\_naaman
