View Single Post
Old 07-18-2011, 11:09 PM  
camperjohn64
Confirmed User
 
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
Why you splitting up the table and making it so complicated?

Code:
table 1: ads
- a_id (PRIMARY)
- a_area
- a_code
- a_imp
- at_tid
- at_aid
- t_id (PRIMARY)
- t_name (Unique)
- t_category_name (INT(1), *INDEX)

// 1='sponsor1',2='big tits',3='milf',4='lisa ann',5='anal',6='default'

SELECT * from table a where t_category_name = 5 ORDER BY RAND() LIMIT 1
__________________
www.gimmiegirlproductions.com
camperjohn64 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote