From 44bd10fa25c980737e7f2a731aefb46095b1f569 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Tue, 25 Mar 2008 22:27:37 +0000 Subject: userguide note, corrections and omissions --- user_guide/database/helpers.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide/database/helpers.html') diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html index 409660e2a..b3dab62d7 100644 --- a/user_guide/database/helpers.html +++ b/user_guide/database/helpers.html @@ -126,8 +126,8 @@ $where = "author_id = 1 AND status = 'active'"; $str = $this->db->update_string('table_name', $data, $where); -

The first parameter is the table name, the second is an associative array with the data to be inserted, and the third parameter is the "where" clause. The above example produces:

- UPDATE exp_weblog SET name = 'Rick', email = 'rick@your-site.com', url = 'www.your-site.com' WHERE author_id = 1 AND status = 'active' +

The first parameter is the table name, the second is an associative array with the data to be updated, and the third parameter is the "where" clause. The above example produces:

+ UPDATE table_name SET name = 'Rick', email = 'rick@your-site.com', url = 'www.your-site.com' WHERE author_id = 1 AND status = 'active'

Note: Values are automatically escaped, producing safer queries.

-- cgit v1.2.3-24-g4f1b