TOUGHENOUGH
New Member
I have these tables:\[code\]category table:cat_id (PK)cat_namecategory_options tableption_id (PK)cat_id (FK)option_nameoption_values table:value_id (PK)option_id (FK)valueclassifieds table:ad_id (PK) (VARCHAR) something like "Bmw330ci_28238239832"poster_id (FK)cat_id (FK)headlinedescriptionpriceetc....posters tableoster_id (PK)name emailtelpasswordetc....\[/code\]Three main questions:
1- Is the above good enough? It covers all my needs atleast...
2- Sometimes when I try out different queries, I get strange results... Could you write a PHP query string which will fetch one complete ad from an ad_id only? (imagine the only variable you have is ad_id)
3- In the query string, must I specify all different tables which are connected in order to display an ad? Can't I just use something like "SELECT * FROM classifieds WHERE ad_id=$ad_id" and it would handle the links automatically, ie fetch all related information also?
Thanks and if you need more input let me know!
1- Is the above good enough? It covers all my needs atleast...
2- Sometimes when I try out different queries, I get strange results... Could you write a PHP query string which will fetch one complete ad from an ad_id only? (imagine the only variable you have is ad_id)
3- In the query string, must I specify all different tables which are connected in order to display an ad? Can't I just use something like "SELECT * FROM classifieds WHERE ad_id=$ad_id" and it would handle the links automatically, ie fetch all related information also?
Thanks and if you need more input let me know!