Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1770 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Repeating and Single Queries

Thread title: Repeating and Single Queries
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
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?

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed