cleanup du code

This commit is contained in:
opensides 2004-09-10 23:33:08 +00:00
parent f60aac7ac9
commit 07aff1bf45

View File

@ -52,19 +52,19 @@ class Livre {
$this->annee = 0;
}
$sql = "insert into ".DB_NAME_OSC.".products (products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_date_added) ";
$sql .= "values ('', '', 'Array', '', null, '', '0', '0', '8', now())";
$sql = "INSERT INTO ".DB_NAME_OSC.".products (products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_date_added) ";
$sql .= "VALUES ('', '', 'Array', '', null, '', '0', '0', '8', now())";
if ($this->db->query($sql) )
{
$idosc = $this->db->last_insert_id();
$sql = "insert into ".DB_NAME_OSC.".products_to_categories (products_id, categories_id) values ($idosc, 0)";
$sql = "INSERT INTO ".DB_NAME_OSC.".products_to_categories (products_id, categories_id) VALUES ($idosc, 0)";
if ($this->db->query($sql) )
{
$sql = "insert into ".DB_NAME_OSC.".products_description (products_name, products_description, products_url, products_id, language_id) values ('".trim($this->titre)."', '".trim($this->description)."', '', $idosc, '".OSC_LANGUAGE_ID."')";
$sql = "INSERT INTO ".DB_NAME_OSC.".products_description (products_name, products_description, products_url, products_id, language_id) VALUES ('".trim($this->titre)."', '".trim($this->description)."', '', $idosc, '".OSC_LANGUAGE_ID."')";
if ($this->db->query($sql) )
{
@ -113,7 +113,7 @@ class Livre {
function linkga($id, $gaid)
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."livre_to_auteur (fk_livre, fk_auteur) values ($id, $gaid)";
$sql = "INSERT INTO ".MAIN_DB_PREFIX."livre_to_auteur (fk_livre, fk_auteur) VALUES ($id, $gaid)";
if ( $this->db->query($sql) )
{