Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marco magazzino #3

Open
wants to merge 1 commit into
base: 15_cart_archive
Choose a base branch
from
Open

Marco magazzino #3

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 2, 2016

Ho creato una classe Magazzino,php, e una pagina magazzino.php.
Riesco a vedere le quantità presenti a magazzino.
All'ultimo ho cercato di aggiornare il magazzino con l'update delle quantità ma non sono riuscito a verificare.

salvaOrdine($prodotti, $utente);
salvaMagazzino($prodotti);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sarebbe interessante provare a usare una classe a parte per inizializzare e salvare il magazzino, invece che delle normali funzioni

@marcosh
Copy link
Member

marcosh commented Mar 9, 2016

Quando fai un commit, soprattutto se è qualcosa che poi va condiviso con altro, fai attenzione ad includere solo i file che riguardano la funzionalità in questione

@@ -18,6 +19,15 @@ function inizializzaListaProdotti() {
return $stmt->fetchAll(PDO::FETCH_CLASS, Tavoletta::class);
}

function inizializzaMagazzino() {
$db = creaConnessionePDO();
$stmt = $db->prepare('SELECT * FROM magazzino');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sarebbe stato utile avere una migrazione per tracciare le modifiche allo schema del database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants