Jump to content

sorting by letter


flemingmike

Recommended Posts

hello, i have the following, which is sorting by id number with a horizontal line between.  im trying to make it so that it is sorted by supplier with lines between each letter.

 

 

<?phpif ($PreviousID!=0 && $ManID != $PreviousID) {?>                           <hr />                           <?PHP }                           $PreviousID = $ManID;					  include 'config.php';include 'javascript.php';@mysql_select_db ("citycore", $conn) OR DIE (mysql_error());$sql = "SELECT * FROM supplier ORDER BY supplier";$result = @mysql_query($sql, $conn) or die(mysql_error());//$row2 = mysql_query($sql, $conn);$PreviousID=0;while ($row = mysql_fetch_array($result)) {  $ManID = $row['id'];  $id=$row['id'];  $supplier=$row['supplier'];  $address=$row['address'];  $city=$row['city'];  $province=$row['province'];  $postal=$row['postal'];  $phone2=$row['phone2'];  $phone=$row['phone'];  $fax=$row['fax'];  $email=$row['email'];    	?>	<div align="center">                              <table border="1" width="95%" style="border-collapse: collapse">                                <tr>                                  <td><?php echo $row['supplier'];?></td>                                  <td><a href="http://mapof.it/<?php echo($address .' ' .$city .',' .' ' .$province .' ' .$postal); ?>" target="_blank"><?php echo($address .' ' .$city .',' .' ' .$province .' ' .$postal); ?></a></td>                                </tr>                              </table>                              </div><?PHP  } ?>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.