Cheetah

This page last updated on Tue Mar 2, 2010
 
Island
My SQL Data Browser Version 4.3
Home Download Source Tables Documentation
Showing msdbDoc order by id (1 Rows).
# category title ordinal content
1
Introduction
Introduction
10
A loosely coupled MVC approach:

The model:

products.crtable.sql:

create table products (
id int auto_increment,
catNo varchar(255),
name varchar(255),
price double,
primary key(id)
)

The view:

products.tpl:

<html>
<head>
<title>{$title}</title>
</head>
<body>
<table>
{foreach from=$products item=product}
<tr>
{foreach from=$product item=$attribute}
<td>
{$attribute}
</td>
{/foreach}
</tr>
{/foreach}
</table>
</body>
</html>

The controller:

index.php:

<?
require_once("config.php");
$m = new Mmodel();
$v = new Mview();
$c = new Mcontroller($m, $v);
$products = $c->m->getAssoc("select * from products");
$c->v->showTpl("products.tpl", array('products' => $products, 'title' => 'A loosly coupled MVC approach',));
?>
Edit New Delete
category title ordinal content
# Cancel
category title ordinal
# Cancel
My SQL Data Browser Version 4.3
Home Download Source Tables Documentation

Support My Sql Data Browser via Sponsors
This page is a demonstration of MSDB - My Sql Data Browser:
MSDB is an open source front end to MySQL written in PHP, JavaScript, Ajax, jQuery and Smarty.
Unlike phpMyAdmin, there are no administrative facilities.
The name Theora is a tribute to the character Theora Jones from the TV series Max Headroom.
The Ogg Theora Codec is not here.
Swine Flu Statistics
Get My SQL Data Browser at SourceForge.net. MySQL PHP Ajax jQuery Smarty phpMyAdmin
Theora Jones Max Headroom Ogg Theora Swine
MSDB is Open Source Software (BSD). © Copyright Ohad Aloni (phone: +972544804122) 2009. All Rights Reserved.
כל הזכויות שמורות - אוהד אלוני - 2009 - 0544804122