View Single Post
07-07-2008, 06:03 AM
#1
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old  Repeating and Single Queries

I was running this query on my website.

PHP Code:
<? include('variables.php'); ?>
<? 
$id
=$_GET['id'];
$query "SELECT * FROM players, national WHERE players.national='$id' AND national.national='$id'";
if (
$r mysql_query ($query)) {
while (
$row mysql_fetch_array ($r)) { 

?>
and at the bottom of the page I had something like

PHP Code:
<? } } die() ?>
This loop was pulling everything from the database that met that query. So everything was being repeated though I only wanted a section of the page repeat, while the rest only gets posted a single time.

How would I go about doing this?