0
Hello, I am making a query with PHP and am connecting to the normal database, however when returning the query and mounting in the table is returning the error: Warning: mysqli_fetch_array() expects Parameter 1 to be mysqli_result, Object Given in on line 273 of my code.
On line 273 I have a While I am searching the array with the values and saving in a variable to organize in my table later. Follow line 273:
while ($result = mysqli_fetch_array($link, $query)) {
Follow now as the connection is being made:
define("HOST","hostmysql");
define("USER","usuario");
define("PASSWORD","senha");
define("DBNAME","nomeDB");
$link = mysqli_connect(HOST,USER,PASSWORD) or die("Erro ao conectar ao banco de dados");
Here’s the Mysql search I’m doing with While again:
`$query = "SELECT id, tipo, numero, ano, descricao, data, horario, arquivos, cadastro, status FROM lici ORDER BY id DESC";
while ($result = mysqli_fetch_array($link, $query)) {`
I hope this helps me.
Thank you!