I have a shopping basket class and want to query my database within it but cannot get my head around it.
I only want to connect to the database upon construct and close the connection upon destruct.
Surely I don’t need to make a new connection for each query I call within the class?
Plus I would prefer to use mysqli
Thanks in advance
Just a quick example of what you could do: