PHP Development
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Remember me

Go Back   Dev Articles Community ForumsProgrammingPHP Development

Closed Thread
Add This Thread To:   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
Unread Dev Articles Community Forums Sponsor:
Old July 1st, 2011, 10:01 PM
mlmpros mlmpros is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
Join Date: Dec 2004
Location: East Texas
Posts: 39 mlmpros User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 59 m 14 sec
Reputation Power: 15
General - Displaying results from multiple field query

Here's the scenario. I have numerous affiliate programs I promote through affiliate networks such as Commission Junction, Cleverbridge and LinkShare. Some of those affiliate programs list with more than one affiliate network.

I list the individual program in my database as "progname" and the associated affiliate network(s) as "netname1", "netname2" and "netname3" with corresponding referral urls for the associated affiliate program as "netnameurl1", "netnameurl2" and "netnameurl3."

My desired output is a list of affiliate programs and their matching referral url where the affiliate network name matches the search criteria.

For example, let's say affiliate program "" is listed with both Commission Junction and LinkShare and my search term is Commission Junction. For that particular program, LinkShare is entered as "netname1" and Commission Junction is entered as "netname2" (network listing order may vary for other programs). My desired output would be:

If my search term was LinkShare, the desired output would be:

Here's what I have so far, but it won't list the url.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">

<html xmlns="" xmlns:v="urn:schemas-microsoft-com:vml" >


<meta name="robots" content="noindex, nofollow"/>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<link rel="stylesheet" type="text/css" href=""/>

<title>Search Results for Affiliate Program Database</title>

<base target="_blank" />



<div style="width: 100%; padding: 1em; text-align: center; margin: auto">

<p class="center bold lg em">Program by Network Search Results</p>






$query = "SELECT * FROM programs WHERE netname1 LIKE '$search' OR netname2 LIKE '$search' OR netname3 LIKE '$search' ORDER BY progname ASC";

$result=mysql_query($query)or die(mysql_error());







<h1><?echo $search;?></h1>

<table style="border: 1px solid black; text-align: center; margin: auto">

<thead style="background-color: #369; color: white">


<th>Program Name</th>

<th>Referral URL</th>





while($i< $num){







<tbody class="left">


<td><?echo $progname;?></td>

<td><?echo $neturl;?></td>









<table style="margin-left: 12em; border: 2px solid red">

<tr><td style="background-color: #369; color: white"><?echo $num;?></td></tr>






Reply With Quote
Closed Thread

Viewing: Dev Articles Community ForumsProgrammingPHP Development > General - Displaying results from multiple field query

Developer Shed Advertisers and Affiliates

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.

© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap