Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ok, well I'm not a php expert, but I got you started on the sql side of things. I CAN help you with php, but there are others here that are more versed in it that I am.</p> <p>I started this sqlFiddle for you, go have a look and you can tinker with the query to get what you want.</p> <p><a href="http://sqlfiddle.com/#!2/79ecf/1/0" rel="nofollow">http://sqlfiddle.com/#!2/79ecf/1/0</a></p> <p>From the php side, until you know how you want to display your data, it's difficult to say what your query needs to look like. I went with this for the time being:</p> <pre><code>select * from images i inner join comments c on i.image_id=c.image_id; </code></pre> <p>This is a VERY simple query and you will probably end up needing to add to it.</p> <p>I'll assume you are using mysql as most people using php choose mysql. From my understanding there are 2 ways to connect, mysqli and pdo. PDO seems to be emerging as the preferred method, but I know nothing about it. Here are references for both. Just DO NOT USE mysql_query(), it is deprecated so don't bother learning any part of it.</p> <pre><code>PDO: http://dev.mysql.com/doc/refman/5.6/en/apis-php-pdo-mysql.html MYSQLI: http://php.net/manual/en/mysqli.query.php </code></pre> <p>Either of these should give enough of a tutorial to show you how to query your database and then loop through the results to get to your data. It is then up to you how you want to display it on your page.</p> <p>Hopefully this is enough to point you in the right direction.</p> <p>Good Luck!</p>
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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