Inserting a row of coloured cells

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

Post Reply
adamyork
Forum Newbie
Posts: 4
Joined: Mon Nov 29, 2010 7:24 am

Inserting a row of coloured cells

Post by adamyork »

On my site, I currently have a page that lists my team's fixtures: http://www.cfrclunj.co.uk/fixtures.php

As can be seen, in between each separate month there is a row of blank, grey cells.

I am now updating the site so that it takes all information from a database (for easier update). On my test page (at bottom) I have recreated the fixtures table using my db: http://www.cfrclunj.co.uk/db_test.php

What I am wondering is if there is any way to get the grey monthly separater row into my table. Could this be done by inserting a row of data into the db table that uses an if statement to change it's appearance? Or could I somehow use MYSQL/PHP to make it put a row in for each separate month?

I have to admit my PHP and MYSQL skills are still at a very basic level, and so any help would be great!
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Inserting a row of coloured cells

Post by social_experiment »

adamyork wrote:Or could I somehow use MYSQL/PHP to make it put a row in for each separate month?
Most likely. Your code that is generating the tables for each month will need an additional echo, that creates another row with a different class which you will color grey using CSS
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply