Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2016

    Unanswered: results from two tables problem

    Hi all, got a problem trying to retrieve data from another table. Clicking from a previous page i go to another which shoes information about a Supplier' from Suppliers table. There is another table called 'brands' which contains brands relating to all suppliers. the 'brands' table has a collumn called supplier_id. this is identicle to id of the supplier.

    I tried a LEFT JOIN but just returned an error, unless done something completely wrong. Can anyone help? Thanks in advance.

    PHP Code:
    $sql "
    SELECT, suppliers.b2b,, suppliers.errorlist
    FROM suppliers
    WHERE id = \"" 
    .(int)$_GET['id'] . "\"

    $results $con->query($sql);

    $results->num_rows) {
    $row $results->fetch_object()) {
        <div class='supplier-heading'>Supplier: <h3>
        <p><strong>B2B website:</strong> <a href='
        <p>Issues with epos or special notes.</p>
        <div class='brand-notes'><p>
    } else {
    'No Results';
    Last edited by TheTrooper; 01-30-16 at 08:44. Reason: wrong code was entered

  2. #2
    Join Date
    Dec 2007
    Richmond, VA
    Provided Answers: 5
    what error? and where is the outer join you tried?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts