lundi 15 mars 2021

NEED HELP the php not finding a sql data

I have a problem with a php not detecting an sql code. I need a "My orders" Tab and usually with older version of php it worked perfectly but I updated to the newest and its not working! It suppose to detect "id_klieta" from "zamowienia" and "id_klieta" from "uzytkowicy" but it shows a message from screenshot

Imagie

Here is my code for that part:

<?php
            require_once "connect.php";

            $polaczenie = @new mysqli($host, $db_user, $db_password, $db_name);
            
            if ($polaczenie->connect_errno!=0)
            {
                echo "Error: ".$polaczenie->connect_errno;
            }
            else
            {
                    $sql="SELECT * FROM zamowienia FULL OUTER JOIN uzytkowicy ON zamowienia.id_klieta=uzytkowicy.id_klieta";
                    $results=mysqli_query($polaczenie, $sql);
                    if ($results->num_rows > 0) {
                      while($row = $results->fetch_assoc()) {
                        echo $row['imie'];
                      }
                    } else {
                      echo "0 results";
                    }
                    $polaczenie->close();
                                            
                                            
            }
        ?>



Aucun commentaire:

Enregistrer un commentaire