I'm a little new to programming and I'm having a hard time, I was programming a website and I ran it on wampserver, but for a while I updated the wamp version and MYSQL's php commands stopped working, it works only when I change the commands to MYSQLI and even though I'm still giving mtos errors mysqli_query() expects at least 2 parameters, 1 given in ./.../.....
or mysqli_error() expects exactly 1 parameter, 0 given in
in every select I used, for example:
$variavel = mysqli_query("SELECT * FROM tabela ORDER BY RAND() LIMIT 5") or die(mysqli_error());
The connection part with the bank looks like this:
header( 'Content-Type: text/html; charset=utf-8' );
$servidor = "...";
$usuarioServidor = "...";
$senhaServidor = "...";
$nomeBD = "...";
$conectar = @mysqli_connect($servidor,$usuarioServidor,$senhaServidor) or die ("Não foi possível acessar o servidor");
$selesionarBD = @mysqli_select_db($nomeBD,$conectar) or die (mysqli_error());
Remembering that when I put MYSQL does not work, only with MYSQLI
Why MYSQL commands are no longer working and why MYSQLI are giving error?