Results 1 to 1 of 1

Thread: Sort - categorize problem

  1. #1
    Join Date
    Dec 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sort - categorize problem

    Hi,

    Can anyone help me in my problem in sorting or categorizing.

    Problem 1.) I want to establish when you click 'Acer' in the right side, all of the acer product will appear on the left side.

    Problem 2.) When i add new products on my database, the new item will be adding on the right side menu,

    and it will appear like this :

    - Acer
    - HP
    - Lenovo
    - Acer

    Snapshot of the page:



    Database : SQL







    Submenu_id / Menu_id
    1.....................1
    1.....................2
    1.....................3
    1 ....................4

    Recordset Code:

    $colname_noticia3 = "1";
    if (isset($_GET['model_id'])) {
    $colname_noticia3 = $_GET['model_id'];
    }


    mysql_select_db($database_gtidb, $gtidb);
    $query_noticia = "SELECT * FROM tblbrand";
    $noticia = mysql_query($query_noticia, $gtidb) or die(mysql_error());
    $row_noticia = mysql_fetch_assoc($noticia);
    $totalRows_noticia = mysql_num_rows($noticia);

    mysql_select_db($database_gtidb, $gtidb);
    $query_noticia2 = "SELECT * FROM tblcategory";
    $noticia2 = mysql_query($query_noticia2, $gtidb) or die(mysql_error());
    $row_noticia2 = mysql_fetch_assoc($noticia2);
    $totalRows_noticia2 = mysql_num_rows($noticia2);

    mysql_select_db($database_gtidb, $gtidb);
    $query_noticia3 = sprintf("SELECT * FROM tblmodel WHERE model_id = %s", GetSQLValueString($colname_noticia3, "int"));
    $noticia3 = mysql_query($query_noticia3, $gtidb) or die(mysql_error());
    $row_noticia3 = mysql_fetch_assoc($noticia3);
    $totalRows_noticia3 = mysql_num_rows($noticia3);

    Code - Right Menu ::

    <div id="menu">
    <?php do { ?>
    <li><font size="2">
    <a href="products_desktop.php?menu_id=<?php echo $row_rscontent_title['menu_id']; ?>"><font size="2"><?php echo $row_rscontent_title['brand']; ?></font></a></font></li>
    <hr />
    <?php } while ($row_rscontent_title = mysql_fetch_assoc($rscontent_title)); ?>

    <br />
    </div>

    Code : Left Menu :

    <?php do { ?>
    <table border="0">
    <tr>
    <td><div> <a class="products" target="_self" href="products_desktopcontent.php?menu_id=<?php echo $row_rscontent['menu_id']; ?>&submenu_id=<?php echo $row_rscontent['submenu_id']; ?>"> <?php echo $row_rscontent['model_name']; ?> </a> </div>
    <?php if ($_SESSION['user_isadmin'] == 1) { ?>
    <a href="products_edit.php?menu_id=<?php echo $row_rscontent['menu_id']; ?>&submenu_id=<?php echo $row_rscontent['submenu_id']; ?>"><img src="images/icon/edit.gif" width="16" height="16" border="0" />Edit</a>
    <?php }?>
    <?php if ($_SESSION['user_isadmin'] == 1) { ?>
    |
    <script language="JavaScript" type="text/javascript">
    function submitform()
    {
    document.myform.submit();
    }
    </script>
    <img src="Images/Icon/delete.gif" width="17" height="16" border="0" /> <a href="#" onclick="javascript:confirmdelete(<?php echo $row_rscontent['content_id']; ?>);">Delete</a>
    <?php }?></td>
    </tr>
    </table>
    <br />
    <font size="1" face="Helvetica" color="#666666"><?php echo $row_rscontent['short_description']; ?></font> <br />
    <br />
    <table border="0">
    <tr>
    <td><font size="2" face="tahoma"><b>Free:</b></font></td>
    <td><font size="1" color="royalblue" face="verdana"><b><?php echo $row_rscontent['free']; ?></b></font></td>
    </tr>
    </table>
    <br />
    <table border="0">
    <tr>
    <td><font size="2" face="tahoma"><b>SRP:</b></font></td>
    <td><font size="1" color="red" face="verdana"><b><?php echo $row_rscontent['srp']; ?></b></font></td>
    </tr>
    </table>
    <br />
    <hr style="margin: 5px;" />
    <?php } while ($row_rscontent_title = mysql_fetch_assoc($rscontent_title)); ?>



    Last edited by psarangaya13; 02-23-2010 at 07:56 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •