Jump to content

What is the PHP variable or object to connect to database


ColdDistance

Recommended Posts

Hi, I'm trying to build a personal module to manage returns and I want to make a HTML select with the orders and their customers.

 

I need to know what is the variable or object to connect with the database because I do a SQL query in my PHP script, but I don't know how to do the connection to database.

Link to comment
Share on other sites

i forgot to mention about little modification for INSERT / UPDATE / DELETE queries:

 

in these cases you have to use execute function instead the executeS

 

example:

Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'something` (row) VALUES (value)');

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...