Any ideas?????

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Any ideas?????

Post by aceconcepts »

hI Dave,

How's going?

Have you created those tables?
dave_55
Forum Newbie
Posts: 19
Joined: Mon Mar 31, 2008 8:33 am

Re: Any ideas?????

Post 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???
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Any ideas?????

Post by aceconcepts »

have you done any coding yet?
dave_55
Forum Newbie
Posts: 19
Joined: Mon Mar 31, 2008 8:33 am

Re: Any ideas?????

Post 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????
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: Any ideas?????

Post 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.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
dave_55
Forum Newbie
Posts: 19
Joined: Mon Mar 31, 2008 8:33 am

Re: Any ideas?????

Post 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.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Any ideas?????

Post 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.
dave_55
Forum Newbie
Posts: 19
Joined: Mon Mar 31, 2008 8:33 am

Re: Any ideas?????

Post by dave_55 »

ok done that
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Any ideas?????

Post 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?
dave_55
Forum Newbie
Posts: 19
Joined: Mon Mar 31, 2008 8:33 am

Re: Any ideas?????

Post 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);

?>
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Any ideas?????

Post by aceconcepts »

i'll post back tomorrow
Post Reply