How to seperate mysql queries using CSS

I have a list of reports that I’m pulling from a database table which is ordered by name alphabetically. Is there anyway to separate the names into their own sections, other than alphabetizing?
Here is the website:
http://consolidatedgypsum.ca/cgs-new-site/admin/project-leads/index.php
username: Test1
Password: test1234

Here is the code:
//step 1: Retrieve data to create links
$result = mysql_query("SELECT * FROM Reports ORDER BY name ASC ") or die(mysql_error());
while($row = mysql_fetch_array($result)){
$sale = $row[‘sale’];
$questiontwo = $row[‘questiontwo’];
$questionthree = $row[‘questionthree’];
$questionfour = $row[‘questionfour’];
$questionfive = $row[‘questionfive’];
$questionsix = $row[‘questionsix’];
$questionseven = $row[‘questionseven’];
$questioneight = $row[‘questioneight’];

                              echo "<ul class=\"reports\">" . "<span>" . $row['name'] . "</span>" . '<li><a href="updated-reports.php?id=' . $row['id'] . '">' . $sale . '</a></li></ul>' ;

     }

I tried to have a look at this for you but the username and password isn’t working?

How are the names stored (eg all one field, or separate fields for first name and last name, etc)?

Are you trying to get it so that it’ll show A then listing all the names beginning with A (by firstname or lastname?), B, then showing all those starting with B, etc.

btw, are you aware that the old mysql_* extension is deprecated as of version 5.5 of PHP?

Also be aware that placing a <span> between a <ul> and <li> is invalid.

It’s better just to show HTML ad CSS in this section (and with a CSS question) as what happens on the backend is irrelevant to the question. It’s not quite clear what you are trying to do with CSS, so it would be useful to clarify that.

I have typo, sorry.

Password is test1234

All in one field under “name”, and I’m aware of that, the hosting that I’m currently using still using 5.3

Thanks, I’m fixing that now. If you view the webpage, you’ll see that there are names (in #000) beside the job names (in #034C9E). What I’m trying to do is somehow separate the each persons job into there own area. so for example:

Admin job name
Admin Job name
Admin Job name

Leah McKenzie job name
Leah McKenzie job name

and so on, if that makes a bit more sense. I know for the most part there separated now, but I would like to be able to separate each section( each person(s)) with a </hr> or a divider.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.