Files
le-matelot/client/plugins/codepromo/classes/Codepromo_util.class.php
2020-01-27 08:56:08 +01:00

38 lines
846 B
PHP

<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Baseobj.class.php");
class Codepromo_util extends PluginsClassiques{
var $id;
var $promo;
var $commande;
var $table="codepromo_util";
var $bddvars = array("id", "promo", "commande");
function __construct(){
parent::__construct();
}
function init(){
$query = "CREATE TABLE `$this->table` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`promo` int(11) NOT NULL,
`commande` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `commande` (`commande`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;";
$resul = mysql_query($query, $this->link);
}
function charger($commande){
return $this->getVars("select * from $this->table where commande=\"$commande\"");
}
}
?>