Jump to content

Repeat region


pumaf1

Recommended Posts

Hia All (again),

I can get a list of what i want like this:

http://www.pumaf1.org.uk/res/infobase/driverall.php (but it need tweaking - under another topic)

 

now i have got it to go to the results page (took me ages)

the code:

 <?php   
   // connect to the server
   mysql_connect( 'localhost', '', '' )
      or die( "Error! Could not connect to database: " . mysql_error() );
   
   // select the database
   mysql_select_db( '' )
      or die( "Error! Could not select the database: " . mysql_error() );
   
   // get the id from the URL request
   $name = $_REQUEST['name'];

   // retrieve the row from the database
   $query = "SELECT * FROM `infobase` WHERE `name`='$name'";
   
   $result = mysql_query( $query );

   // print out the results
   if( $result && $contact = mysql_fetch_object( $result ) )
   {
      // print out the info
      $name = $contact -> name;
      ?>

 

no what i want it to do is query the db and bring out all of the records for that driver as defined in $name, for the wholeof that drivers career but limited to a certain number of records.

 

again anyone that can help please do!

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/67471-repeat-region/
Share on other sites

sorry this is what I mean

 

1 - you select a driver - for example Berger, Gerhard from this page - http://www.pumaf1.org.uk/res/infobase/driverall.php

2 - the system then takes you to a page - (which it does)

3 - what it should do is - select ALL the races the driver has driven. (I want to expand on this to limit it to say 50 records per page)

 

hope that helps show you want i want it to do.

 

Link to comment
https://forums.phpfreaks.com/topic/67471-repeat-region/#findComment-338851
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.