-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,471
  • 17
  • 87
  • 173
asdwal
  • 31
  • 1
  • 1
  • 9

2 Answers2

2

There are two main options:

The latter lends itself better to OOP techniques.

BenM
  • 51,470
  • 24
  • 115
  • 164
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
  • 6,725
  • 9
  • 32
  • 63