I have a table with my products and I'm trying to write a page that would pull bracelets with certain colors from the database. So here's what I have right now (in php):
$query = "SELECT * FROM products WHERE (products.colors LIKE '%black%')";
But I only want to select rows where the value for the column "category" equals "bracelet".
...
I have the following 3 tables:
(PK = Primary Key, FK = Foreign Key)
Files Table
File ID (PK) File Name ...
------------ ---------
1 a.jpg ...
2 b.png ...
3 c.jpg ...
. .
. .
. .
Tags Table
Tag ID (PK) Ta...
Hey folks :)
I'm having a little trouble with an sql query. Which is why I hope some of you will be able to help me.
I've got an query that selects the latest entry from each relational id but i want to select the latest where the status is different. The table looks like this.
+-----------+-------------+------+-----+-----------------...