You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql_select_db($DATABASE, $dbLink) ordie( "Unable to select database..." );
}
?>
model.php
=========
<?php
class Model(){
var $dbLink;
functionModel($dbLink){
$this->dbLink=$dbLink;
}
functionfetchRecords(){
$qry="SELECT brands.Code, brands.Name as BrandName, brands.DescrShort, brands.LogoURL FROM types, items, brands WHERE BrandName NOT LIKE '%Belt%' AND types.Name NOT LIKE '%Belt%' AND types.TypeId = items.TypeId AND items.BrandCode = brands.Code AND items.flagStatus != 'U' GROUP BY brands.Code ORDER BY brands.Name";
$results=mysql_query($qry, $this->dbLink);
return$results;
}
}
?>
belt_example.php
================
<?php
session_start();
include_once("db.php");
include_once("model.php");
// TODO: Fix this so that it doesn't require "Belt" to be in the name.
$belt_brands = query("SELECT brands.Code, brands.Name as BrandName, brands.DescrShort, brands.LogoURL FROM types, items, brands WHERE types.Name LIKE '%Belt%' AND types.TypeId = items.TypeId AND items.BrandCode = brands.Code AND items.flagStatus != 'U' GROUP BY brands.Code ORDER BY brands.Name");
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: Fix this so that it doesn't require "Belt" to be in the name.
$belt_brands = query("SELECT brands.Code, brands.Name as BrandName, brands.DescrShort, brands.LogoURL FROM types, items, brands WHERE types.Name LIKE '%Belt%' AND types.TypeId = items.TypeId AND items.BrandCode = brands.Code AND items.flagStatus != 'U' GROUP BY brands.Code ORDER BY brands.Name");
$Title = 'Belts';
$with_footer = false;
include('heading.php');
?>
<?php
display_top_of_page($breadcrumbs=null, $dynamic_breadcrumbs=null, $page_class='belts-page'); // includes leftnav, the start of the central column td that has a background color of #ffffff, and possibly a breadcrumb trail, END.
<td>Click on any of the links below to shop our belt collections by brand or browse <a href="catalog.php?TypeId=1">All Premium Belt Collections</a>.</td>
display_bottom_of_page(); // Ends a td, ends a tr, and ends a table (with page elements for right-side-nav-container, right and bottom shadow inbetween)