Elsewhere...
More and more of OpinionJournal goes behind the paywall. Personally I think it’s the right move, because what’s there to lose? If we won’t pay, the business was over anyway. And my bet is we will.
Macworld Expo 2010 Best of Show.
Russell Beattie: What we really wanted was a MacPad not an iPad.
Sikuli, ingenious GUI scripting. Definitely going to try it.
This video of a tablet mockup makes me horny at last for a tablet computer. I’m excited for tomorrow’s Apple announcement. Guess I’ll be standing in line to buy one as well.
A Little Less Conversation, says Joel Spolsy.
Fake Steve Jobs pens the most insightful piece I’ve read on Google’s complaints vis-a-vis China.
Hypercritical by John Siracusa, or, The Tao of Editing.
A test of input device speed for a 221-word passage.
-
Version
1.1.1 -
More info
-
Type
Plugins -
Elsewhere
EE Forums thread
Devot-ee page -
Buy
-
Download
Register and/or log in to download
Update Entries lets you to easily update rows in any database table — whether within ExpressionEngine’s database or in any database to which you have administrator access.
Compatibility
The plugin works on both EE v1.x and v2.x.
Installation
For EE v1.x, place the pi.update_entries.php file in the /plugins directory.
For EE v1.x, create in the /third_party directory a directory /update_entries, then place the pi.update_entries.php in there.
Parameters
Required parameters
table
The required table parameter tells the plugin which database table to update.
debug
The default value for the debug parameter is “yes”. This is a safety measure to avoid inadvertently changing data wrongly. When debug is on, the plugin does not do the update. Instead, the SQL query and any error messages are displayed within a div of class “update-entries-message”. To activate the plugin, set debug to “no”.
Optional parameters
database
The database parameter is required only if updating a table on an external database. In this scenario the hostname, password and username parameters are also required.
hostname
The hostname parameter is required only if updating a table on an external database. In this scenario the database, password and username parameters are also required.
limit
If the limit parameter is not set, the default value is “1”. This is a safety measure to minimize the damage done by any inadvertent data changes.
parse
The parse parameter is common for all plugins. Setting its value to “inward” allows the plugin to contain another plugin.
password
The password parameter is required only if updating a table on an external database. In this scenario the database, hostname and username parameters are also required.
search:[column_name]
The search:[column_name] parameter limits the plugin to update only those rows in the table where the value of the specified column is equal to the value entered. Any number of search:[column_name] parameters may be used. They are connected by an “and” boolean operator; there is currently no option for “or”. These parameters form the part of the SQL query following “WHERE”.
username
The username parameter is required only if updating a table on an external database. In this scenario the database, hostname and password parameters are also required.
Variables
update:[column_name]
The only variables used by the plugin are the names of the columns to be updated, preceded by “update:”.
Examples
To update a table on the current ExpressionEngine database:
{exp:update_entries table="exp_weblog_titles" search:entry_id="{entry_id}" debug="n"}
{update:status}Purchased{/update:status}
{/exp:update_entries}
To update weblog entries fields requires knowing the actual column name of the field being updated. All weblog fields are in the format “field_id_[xx]”, such as field_id_40. One easy way to find this value is to look at the query string of the URL when editing a field. At the end of the URL’s query string is the field_id — the value here is the number we seek.
To update a table on an external database:
{exp:update_entries
hostname="www.cia.gov"
database="agencies"
username="felix_leiter"
password="alimentary"
table="field_agents"
search:agents_id="7"
debug="n"
}
{update:weapon}Walther PPK 7.65mm{/update:weapon}
{/exp:update_entries}
Changelog
v1.1.1 (2010 Mar 3)
- Fixed bug so that plugin can be used more than once on a template in EEv2
v1.1 (2010 Feb 9)
- Now compatible with both EEv1.x and EEv2.x