View Single Post
Old 09-30-2003, 07:16 PM  
magnatique
Confirmed User
 
magnatique's Avatar
 
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
MYSQL Question - PLEASE HELP

Hey there...


I am trying to figure out the best way to do this...


right now, I do one query where I gather the info needed to build the page...


basically, it returns 4 rows, and with each mysql_fetch_row, I build a html table to display an update... (example, it would build the page listing girl1, girl2, girl3, girl4 with her info such as description, name, etc...)


NOW, I need to test each of these girls against ANOTHER table in mysql database. Unfortunately, I cannot combine the field of that table directly in the same table as the original one, since it's totally different data...

it would basically be a simple query like

SELECT update_info.girl,surfer_behavior.clicks
FROM update_info left join surfer_behavior
on update_info.girl = surfer_behavior.girl;


But, if I split the queries like that, I would have to run the last query 4 times for each girl inside the loop that builds the page, as I need to include that data in order to build the one girl's table...
(basically, I would test if surfer_behavior.clicks < 100, don;t display 'congrats')


What I am wondering is if there's any way you MYSQL gurus might know for me to Sort of JOIN these two queries together with the first one...


in other words, how do I add this to the original query : "and if votes.clicks >100 for current girl in this row, add a column named 'test' that says true"



__________________

Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks
Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites

Last edited by magnatique; 09-30-2003 at 07:21 PM..
magnatique is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote