39 lines
907 B
PHP
39 lines
907 B
PHP
<?php
|
|
require_once ('dbbootstrap.php');
|
|
|
|
Class GiantModel
|
|
{
|
|
function __construct(){
|
|
setDbConn('giantclient');
|
|
}
|
|
private function getCommmande($user)
|
|
{
|
|
$commande = Doctrine_Query::create()
|
|
->select('OrderDateTime, CompanyId, DataSetType')
|
|
->from('commande')
|
|
->where ('Login = :login')
|
|
->execute(array(
|
|
':login' => $user, Doctrine_Core::HYDRATE_ARRAY));
|
|
return ($commande);
|
|
}
|
|
|
|
private function _deleteCommande($param)
|
|
{
|
|
$commande = Doctrine_Query::create()
|
|
->delete()
|
|
->from('commande')
|
|
->where ($param->champ = ':login')
|
|
->executes(array(
|
|
':login' => $param->value));
|
|
}
|
|
|
|
private function _updateCommande($param)
|
|
{
|
|
$commande = Doctrine_Query::create()
|
|
->update($param->champ = $param->value)
|
|
->from('commande')
|
|
->where ($param->loginC = ':login')
|
|
->executes(array(
|
|
':login' => $param->loginV));
|
|
}
|
|
} |