SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 84 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

' = 1';
$nextPosition = $table->getNextOrder($where);
Last of all we can use the move() method to move a record up or down one position.
In this example, we move a record up the order:
$table->load($id);
$table->move(-1);
Again, we have the option of specifying groupings. Imagine that our table also has a
field named group; in this example, we move a record down the order in group 1:
$db =& $table::getDBO();
$where = $db->nameQuote('group').' = 1';
$table->load($id);
$table->move(1, $where);
Parameter Fields
The JTable class does not provide us with any special methods for dealing with INI
parameter fields. The JTable buffer is designed to be populated with the RAW data,
as it will be stored in the database.
To handle a parameter field we use the JParameter class. The first thing we need to
do is create a new JParameter object and, if we are interrogating an existing record,
parse the parameter data.
The Database
[ 62 ]
The JParameter class extends the JRegistry class; the JRegistry class is explained in
Chapter 7.


Pages:
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96