Jump to content

[SOLVED] How can i?


ccrevcypsys

Recommended Posts

Exclude certain rows from a database pull?

heres my code

 

$genre_query = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory WHERE  ".$glob['dbprefix']."CubeCart_inventory.customer_id=customer_id  AND deleted = 0 AND customer_id="" AND cat_id=".$prodArray[0]['cat_id']." ORDER BY popularity DESC LIMIT 9");

Link to comment
Share on other sites

Add something else to your search parameters?

 

$genre_query = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory WHERE  ".$glob['dbprefix']."CubeCart_inventory.customer_id=customer_id  AND deleted = 0 AND customer_id="" AND cat_id=".$prodArray[0]['cat_id']." AND artist != '$current_artist' ORDER BY popularity DESC LIMIT 9");

 

Obviously, i don't know how you will get the current artist, since i don't know how your page is written. Ive just called the variable $current_artists. You'll need to change that.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.