This query works when all variables are defined correctly. Look especially at the table name as this error generally indicates that the query is not written correctly and $table_order_name
is the unknown factor.
$conn_order = mysqli_connect($servername,$username,$password,$dataname);
$select_order = "SELECT * FROM $table_order_name";
$query_order = $conn_order->query($select_order);
while($row = $query_order->FETCH_ASSOC()){
echo "<pre>";
print_r($row);
echo "</pre>";
}
I would probably change the connection to this if you are continuing with mysqli.
$conn_order = new mysqli($servername,$username,$password,$dataname);
1 Like
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.