Jump to content
php.lv forumi

MYSQL


sandrulis

Recommended Posts

tabula izskatās pamēram šādi:

 

| id | name | sticky |

| 1 | nosaukums | 0 |

| 2 | nosaukums | 1 |

| 3 | nosakumus | 0 |

| 4 | nosakumus | 0 |

| 5 | nosakumus | 0 |

 

"SELECT * FROM tabulas_nosaukums ORDER BY id DESC"

 

Viss ir normāli, bet kā lai izveidot tā , lai 'sticky ' ieraksts rādītos kā pirmais un tad atkal pēc 'id' DESC?

 

P.S. visiemabūt vienā 'SELECT ', jo visi ieraksti tiks kārtoti pēc tam pa lapām

Edited by sandrulis
Link to comment
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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...