if event is in cat query problem

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

if event is in cat query problem

Post by itsmani1 »

i want to check if event id is in category id or not?
table structure is like

id
eventid
categoryid


any help?
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

Code: Select all

SELECT id FROM tablename AS tablea, tablename AS tableb WHERE tablea.categoryid=tableb.eventid
Post Reply