some errors in your query
$MainQuery = "SELECT Name FROM TeamProInfo WHERE Number = '$Team' " ;
$PlayerQuery = "SELECT * FROM PlayerInfo WHERE TeamName = '$TeamName' ";
also, for column titles it is preferable to put them like this if they contain spaces
`PlayerInfo`
Trying to setup PHP Template Website
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Trying to setup PHP Template Website
That worked like a charm...Much appreciated! So now I notice the Farm Team name in PlayerInfo has the pro team abbreviation at the end. Any idea how I can combine the "SELECT Name FROM TeamFarmInfo WHERE Number = '$Team'" and "SELECT Abbre FROM TeamProInfo WHERE Number = '$Team'" to create Providence Bruins (BOS) as a string to pull those players?
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Trying to setup PHP Template Website
Never mind...I was able to do it using LIKE '%$FarmTeamName%' rather than trying to combine the values from 2 separate columns in 2 separate tables.
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Trying to setup PHP Template Website
So now the new issue...When I pull the data back into the site it goes outside of the page border which I have set to 1000px. I have a div id set and it is inside the border but the tables it pulls it go outside of that. Any ideas? I've tried putting width="819px" (I have a menu on the left that takes up 120px and the container where the tables go starts at 121px) everywhere to no avail. The tables start properly but go way too wide.
Basically my question is how can I force the output of the query to fit into a box with a specific height and width?
Basically my question is how can I force the output of the query to fit into a box with a specific height and width?
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Trying to setup PHP Template Website
Anyone have any ideas with regards to the table that has the roster going outside the body of the website?
-
- The Addict / Le Drogué
- Posts: 770
- Joined: Mon Aug 14, 2006 5:15 pm
- Location: Vancouver, BC
- Contact:
Re: Trying to setup PHP Template Website
I don't think you can output a whole row and have it formatted... think you will need put the data in an array then have a php loop to print each cell... and value for that cell, or at least that's what I think I see in examples Simon posted on github.
I haven't dug into it too much yet.
I haven't dug into it too much yet.
BFHL Admin/Commish
http://www.thebfhl.ca/bfhl
Now in Season 15, using BRHL Player v2.1 Ratings modified.
http://www.thebfhl.ca/bfhl
Now in Season 15, using BRHL Player v2.1 Ratings modified.
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Trying to setup PHP Template Website
Yeah that's what I'm doing. I'm getting all the data back as an array then echoing the data into a table. Problem is the table doesn't seem to be take any html format commands.
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Trying to setup PHP Template Website
I think I'm past the table sizing issue. Now I'm trying to pull in team and league leaders as a side bar. Not having much luck so far. Anyone have any pointers for doing so?
Re: Trying to setup PHP Template Website
You need to use HTML and CSS. Create a <content> and a <aside> tag and then have them both float:leftBmoney0313 wrote:I think I'm past the table sizing issue. Now I'm trying to pull in team and league leaders as a side bar. Not having much luck so far. Anyone have any pointers for doing so?
Warning: make sure both div's combined width is not > 100% or else, this method won't work. Also, if you have a margin, don't forget to add it to the calculation or else, it won't work either.
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Trying to setup PHP Template Website
Thanks, it's been a while since I've worked on this since Dreamweaver decided to overwrite my almost complete style.css file. But I appreciated your input.