Walczę...
ponieważ już miałem gotowe zapytanie dla employee to próbuje dodać employee (z customer powinno byc tak samo?) ale chyba musze od razu spróbowacna customer bo chyba coś robię źle, tzn. nie mam żadnych błędów ale nic nie zapisuje sie w bazie. Próbowałem obie metody i klapa.
Plik wygląda aktualnie tak:
<?php
include_once(dirname(__FILE__).'/config/config.inc.php');
$db = Db::getInstance();
$query = ('INSERT INTO ' . _DB_PREFIX_ . 'ps_employee ( `id_employee` ,
`id_profile` ,
`id_lang` ,
`lastname` ,
`firstname` ,
`email` ,
`passwd` ,
`last_passwd_gen` ,
`stats_date_from` ,
`stats_date_to` ,
`stats_compare_from` ,
`stats_compare_to` ,
`stats_compare_option` ,
`preselect_date_range` ,
`bo_color` ,
`bo_theme` ,
`bo_css` ,
`default_tab` ,
`bo_width` ,
`bo_menu` ,
`active` ,
`optin` ,
`id_last_order` ,
`id_last_customer_message` ,
`id_last_customer` ,
`last_connection_date`
)
VALUES (NULL,
`15`,
`1`,
`nazwisko`,
`imie`,
`email@email.pl`,
`haslohaslo`,
`2014-12-27 14:15:27`,
`2014-11-27`,
`2014-12-27`,
`0000-00-00`,
`0000-00-00`,
`1`,
NULL ,
NULL ,
`default`,
`admin-theme.css`,
`1`,
`0`,
`1`,
`1`,
`0`,
`0`,
`0`,
`0`,
`2015-03-25` );'); ?>
A co do hasha dostaje Fatal error Class 'Tools' not found in scieżka do pliku linia 6 czyli if($check_hash = Tools::getValue('hash', 0) && $check_hash = $hash)
Z połączeniem do bazy już sobie poradziłem jest prosty błąd
_DB_PREFIX_ . 'ps_employee czyli daje to ps_ps_employee
Teraz jest taki błąd
Fatal error: Uncaught Unknown column '15' in 'field list'
więc w VALUE zamieniłem 15 na NULL to dostaje taki sam komunikat z wartością column '1'