The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Thanks so much for answering my question! I don't know how many more you are interested in but I will post a couple of other challenges:

1. I want to take my list and divide them out by state but I want it to have a format like this:

5 Columns and the title of the column put in when a new set of listings starts for a state by state basis. Someone told me that I could type one line of code and it's possible but I'm not sure. If not, I do know how to break it out with WHERE state=""

2. I have a column for email addresses and one for website addresses, and instead of displaying someonesname@somedomain.com , I want to put "EMAIL" or something in it's place. I'll do the same for a website listing and link them up but not all entries have a website or email address so I don't want a link created if there is no address behind them.

Thanks so much for answering my question! I don't know how many more you are interested in but I will post a couple of other challenges:

1. I want to take my list and divide them out by state but I want it to have a format like this:

5 Columns and the title of the column put in when a new set of listings starts for a state by state basis. Someone told me that I could type one line of code and it's possible but I'm not sure. If not, I do know how to break it out with WHERE state=""

2. I have a column for email addresses and one for website addresses, and instead of displaying someonesname@somedomain.com , I want to put "EMAIL" or something in it's place. I'll do the same for a website listing and link them up but not all entries have a website or email address so I don't want a link created if there is no address behind them.

Thanks again for your time! It's greatly appreciated.

You would need to use an 'ORDER BY' clause to group the records in order of the state. I'm not sure if you can add the column headings after each group of records for a state, with the 'ORDER BY' clause, you might well need to loop through an array of states (in the order that you want them in), where each time the column names are printed and the records for that state are then printed with the state name that the loop as reached from the array being passed to the query for the 'WHERE' clause.

For the email address, i think your looking at in the loop that displays the records, where it comes to the display of the email address something like: