Page 2 of 2
Re: Any ideas?????
Posted: Mon Mar 31, 2008 4:58 pm
by aceconcepts
hI Dave,
How's going?
Have you created those tables?
Re: Any ideas?????
Posted: Mon Mar 31, 2008 5:37 pm
by dave_55
hey,
yeah created the tables how i think they should be andput a little info in them,
what shall i do next???
Re: Any ideas?????
Posted: Mon Mar 31, 2008 5:40 pm
by aceconcepts
have you done any coding yet?
Re: Any ideas?????
Posted: Mon Mar 31, 2008 5:50 pm
by dave_55
The only thing I know what to do is open the connection to the database like I did before for displaying the fixtures table????
Where shall I go from here????
Re: Any ideas?????
Posted: Mon Mar 31, 2008 5:55 pm
by s.dot
What have you tried?

We are here to help you learn.
Next you should look into using forms to manage your database tables. INSERT queries, UPDATE queries, SELECT queries, and DELETE queries.
Re: Any ideas?????
Posted: Mon Mar 31, 2008 6:00 pm
by dave_55
Ive never used forms before but i do understand how they work, whats the quickest way i can learn them?????
Really need this work getting done.
Re: Any ideas?????
Posted: Mon Mar 31, 2008 6:08 pm
by aceconcepts
Ok,
So the main thing you're gonna want to do is display the fixtures so that the players can select which games they don't want to play.
Create a file called "fixtures_list.php"
This file will list all the fixtures.
Re: Any ideas?????
Posted: Mon Mar 31, 2008 6:11 pm
by dave_55
ok done that
Re: Any ideas?????
Posted: Mon Mar 31, 2008 6:29 pm
by aceconcepts
Code: Select all
//QUERY FOR THE FIXTURE DATA
$fixtQry=musql_query("SELECT * FROM tblFixtures INNER JOIN tblTeam ON tblFixtures.intTeamId=tblTeam.intTeamId ORDER BY fixtureDate");
//the above query will query the database for all of the fixtures, however, i don't know the names of your fields so replace where necessary.
//the INNER JOIN will join the fixtures table with the team table - this means that all teams that have games will be displayed.
//in order for this to work you will have to have a unique id field for both tables.
make sense?
Re: Any ideas?????
Posted: Mon Mar 31, 2008 6:48 pm
by dave_55
Ok this is what i have put together so far. are you saying i need to add team id to the tblfixtures aswell?
<?php
$database = "localhost"; //login to the server
$username = "Dave"; //username login
$password = "*****"; //password login
//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die("<br><br>Unable to connect to Lincoln Database");
echo "<br><br>Connected to Lincoln Database<br><br>";
//select a database to work with
$selected = mysql_select_db("lincolnrugby",$dbhandle)
or die("Could not select lincoln rugby");
$fixtQry=musql_query("SELECT * FROM tblFixtures INNER JOIN tblTeam ON tblFixtures.intTeamId=tblTeam.intTeamId ORDER BY fixtureDate");
//close the connection
mysql_close($dbhandle);
?>
Re: Any ideas?????
Posted: Mon Mar 31, 2008 7:58 pm
by aceconcepts
i'll post back tomorrow