Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Joomla! 1.5 Extension Development
  • Table Of Contents Toc
Learning Joomla! 1.5 Extension Development

Learning Joomla! 1.5 Extension Development - Second Edition

close
close
Learning Joomla! 1.5 Extension Development

Learning Joomla! 1.5 Extension Development

Overview of this book

Table of Contents (14 chapters)
close
close
13
Index

Adding ordered records

There are many circumstances where you will want to enforce a specific ordering for your database records. In our case, certain critics may request to be placed at the top of the list due to their seniority. The JTable class has built-in functions that help you move records up and down within a list and add new ones in the correct place.

When we added the jos_critic table to the database, an ordering column was added. Because records are now added without values for this column, we need to go back and add this information now. For the record with id set to 1, change the ordering column to 1, and change ordering to 2 for record 2. If you are using the MySQL command line client, this query will do it automatically:

UPDATE jos_critic SET ordering = id;

In phpMyAdmin, click the Browse tab after selecting the jos_critic table, then edit both records individually. Click on the pencil icon to the left of the data columns, then add the appropriate value in the ordering field...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Joomla! 1.5 Extension Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon