Hey guys,
I have a question:
So... I want to do a product page with new product, edit product and delete product feature.
While I'm on the modify or the deletion page, I would like to and categorise by date-desc, asc ; by category and alphabeticaly-desc, asc the retrieved content from the db.
I would like to use <select> box which creates a link like: ?page=products&order=category.
and
if($_GET['order']==category)
{
$category = mysql_query("SELECT * FROM content ORDER BY category");
while($row = mysql_fetch_array( $category ))
{
// print the content
}
}
and so.
Is this the best way to do it with select box??
I want to do a user-side product page, where the category of products will be shown like a link (below the title of each one). And this is my big problem... My code looks like this:
$category = mysql_query("SELECT * FROM content WHERE category = '[B][I]asd[/I][/B]'");
while($row = mysql_fetch_array( $category ))
{
// print the content
}
But how can I get my category names from the db into my query?
( - something like:
mysql_query("SELECT * FROM content WHERE category = ' [B][I].$row['category'][/I][/B]'
");
I hope you understand what I would like to ask.