Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy isn't this JOIN working?
    primarykey
    data
    text
    <p>Database Tables</p> <p>ss_merchant</p> <pre><code>+----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------+--------------+------+-----+---------+----------------+ | pk_merchant_id | bigint(20) | NO | PRI | NULL | auto_increment | | name | varchar(45) | YES | | NULL | | | website | varchar(100) | YES | | NULL | | +----------------+--------------+------+-----+---------+----------------+ </code></pre> <p>ss_merchant_store</p> <pre><code>+----------------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------------+-------------+------+-----+---------+----------------+ | pk_merchant_store_id | bigint(20) | NO | PRI | NULL | auto_increment | | fk_pk_merchant_id | bigint(20) | YES | | NULL | | | street | varchar(20) | YES | | NULL | | | city | varchar(20) | YES | | NULL | | | postcode | varchar(8) | YES | | NULL | | | telephone | varchar(15) | YES | | NULL | | | email | varchar(45) | YES | | NULL | | +----------------------+-------------+------+-----+---------+----------------+ </code></pre> <p>ss_merchant_store_rating</p> <pre><code>+-----------------------------+------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------------------+------------+------+-----+---------+----------------+ | pk_merchant_store_rating_id | bigint(20) | NO | PRI | NULL | auto_increment | | fk_pk_merchant_store_id | bigint(20) | NO | | NULL | | | rating | int(1) | YES | | NULL | | +-----------------------------+------------+------+-----+---------+----------------+ </code></pre> <p>and my query:</p> <pre><code>SELECT * FROM ss_merchant JOIN ss_merchant_stores ON ss_merchant.pk_merchant_id = ss_merchant_stores.fk_pk_merchant_id JOIN ss_merchant_store_rating ON ss_merchant_stores.pk_merchant_store_id = ss_merchant_store_rating.fk_pk_merchant_store_id </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload