-2

I have changed my code to cater the new functions of MySQLi. Here is a snippet of my code:

From:

mysqli_query("SELECT user_type FROM user");

To:

mysqli_query("SELECT user_type FROM user");

Although this now does not work, what else would I need to change?

halfer
  • 19,824
  • 17
  • 99
  • 186
asdwal
  • 31
  • 1
  • 1
  • 10

2 Answers2

2

There are two main options:

The latter lends itself better to OOP techniques.

BenM
  • 52,573
  • 26
  • 113
  • 168
0

Change it to mysqli_query("SELECT user_type FROM user");

or, if you want object oriented

$mysqli = new mysqli('localhost', 'root', 'pass', 'db');
$mysqli->query("SELECT user_type FROM USER")
scrblnrd3
  • 7,228
  • 9
  • 33
  • 64