Greenguy's Board WebcamWiz CRAZY $5,000 Reward Bonuses


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2005-03-20, 05:49 PM   #11
swedguy
Vagabond
 
swedguy's Avatar
 
Join Date: Aug 2003
Posts: 2,374
Send a message via ICQ to swedguy
Here's what the full query looks like:

PHP Code:
$uniq_banners 3;
$query 'SELECT '.$uniq_banners.' = COUNT(*) FROM ( 
SELECT DISTINCT 1 FROM banners WHERE sponsor LIKE "$sponsor" AND keyword LIKE "horizontal" 
UNION ALL 
SELECT DISTINCT 1 FROM banners WHERE sponsor LIKE "$sponsor" AND keyword LIKE "vertical" 
UNION ALL 
SELECT DISTINCT 1 FROM banners WHERE sponsor LIKE "$sponsor" AND (keyword LIKE "small" OR keyword LIKE "button") 
) AS tbl'
;

$result mysql_query("SELECT DISTINCT sponsor FROM table");
$myrow mysql_fetch_array($result);
if (
$myrow and @mysql_num_rows($result)) {
  do {
    
$sponsor $myrow["sponsor"];
    eval(
"\$use_query = \"$query\";");
    
$result2 mysql_query($use_query);
    
$res mysql_result($result20);
    if (
$res == 1)
      
// We got a sponsor that has the correct banners
      
;
  } while(
$myrow mysql_fetch_array($result));

swedguy is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:09 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc