Skip to content
Advertisement

Why is this not saving to the database?

I’m trying to save a new product into the database, this product has exportation factors which i’m also trying to save, why is this not working?

The error i’m getting is:

Call to a member function save() on null

on line $export->save();

Advertisement

Answer

Put the insert outside the loop for performance, and dont do a save on something that’s not there

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement