I'm looking on my project to create an entry on my database wuth PHP and MySQL. I've created an class "Order" and iside this class I have a function to create a new entry in my Database.
On my code I want to reuse this function, but hte fact is, when i create the entry I haven't all the Datas (Some Datas are inserted later in the process). So my question is the next one. What is the best to manage it ?
Should I generate some data as NULL ? (that's my fort idea) Like that ?
$unknow = NULL;
$end_date = date('d/m/Y', strtotime("+1 month"));
$user = checkConnected($bdd);
Order::create($bdd, $new_full_modele_devis_path, $unknow, $end_date, 0, $user->getId(), $unknow, $entreprise->getId());
or should I rework my finction to ignore empty datas ?
Thank you for your answers.