Jump to content
vividona

Sticky Topics

Recommended Posts

I need to know how can I make mysql query

calling sticky topics first then normal topics.

 

$q = mysql_query("SELECT * FROM `articles` WHERE `artid`='".artid.'' ORDER BY `sticky` LIMITED 10");

Share this post


Link to post
Share on other sites

if 'sticky' is an integer and has the value 1 for sticky and 0 for normal, then you

order by sticky desc and you will get what you need

Share this post


Link to post
Share on other sites

if 'sticky' is an integer and has the value 1 for sticky and 0 for normal, then you

order by sticky desc and you will get what you need

 

thank you jl5501

everything its ok

Share this post


Link to post
Share on other sites

Hopefully you have corrected that query sample you posted and that you have converted from using the deprecated MySQL_* functions from your script.

Share this post


Link to post
Share on other sites

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.