Query Builder Class¶
CodeIgniter gives you access to a Query Builder class. This pattern allows information to be retrieved, inserted, and updated in your database with minimal scripting. In some cases, only one or two lines of code are necessary to perform a database action. CodeIgniter does not require that each database table be its own class file. It instead provides a more simplified interface.
Beyond simplicity, a major benefit to using the Query Builder features is that it allows you to create database independent applications, since the query syntax is generated by each database adapter. It also allows for safer queries, since the values are escaped automatically by the system.
Loading the Query Builder¶
The Query Builder is loaded through the table()
method on the
database connection. This sets the FROM
portion of the query for you
and returns a new instance of the Query Builder class:
$db = \Config\Database::connect();
$builder = $db->table('users');
The Query Builder is only loaded into memory when you specifically request the class, so no resources are used by default.
Selecting Data¶
The following functions allow you to build SQL SELECT statements.
$builder->get()
Runs the selection query and returns the result. Can be used by itself to retrieve all records from a table:
$builder = $db->table('mytable');
$query = $builder->get(); // Produces: SELECT * FROM mytable
The first and second parameters enable you to set a limit and offset clause:
$query = $builder->get(10, 20);
// Executes: SELECT * FROM mytable LIMIT 20, 10
// (in MySQL. Other databases have slightly different syntax)
You’ll notice that the above function is assigned to a variable named $query, which can be used to show the results:
$query = $builder->get();
foreach ($query->getResult() as $row)
{
echo $row->title;
}
Please visit the result functions page for a full discussion regarding result generation.
$builder->getCompiledSelect()
Compiles the selection query just like $builder->get()
but does not run
the query. This method simply returns the SQL query as a string.
Example:
$sql = $builder->getCompiledSelect();
echo $sql;
// Prints string: SELECT * FROM mytable
The first parameter enables you to set whether or not the query builder query
will be reset (by default it will be reset, just like when using $builder->get()
):
echo $builder->limit(10,20)->getCompiledSelect(false);
// Prints string: SELECT * FROM mytable LIMIT 20, 10
// (in MySQL. Other databases have slightly different syntax)
echo $builder->select('title, content, date')->getCompiledSelect();
// Prints string: SELECT title, content, date FROM mytable LIMIT 20, 10
The key thing to notice in the above example is that the second query did not
utilize $builder->from()
and did not pass a table name into the first
parameter. The reason for this outcome is because the query has not been
executed using $builder->get()
which resets values or reset directly
using $builder->resetQuery()
.
$builder->getWhere()
Identical to the get()
function except that it permits you to add a
“where” clause in the first parameter, instead of using the db->where()
function:
$query = $builder->getWhere(['id' => $id], $limit, $offset);
Please read about the where function below for more information.
$builder->select()
Permits you to write the SELECT portion of your query:
$builder->select('title, content, date');
$query = $builder->get();
// Executes: SELECT title, content, date FROM mytable
Note
If you are selecting all (*) from a table you do not need to
use this function. When omitted, CodeIgniter assumes that you wish
to select all fields and automatically adds SELECT \*
.
$builder->select()
accepts an optional second parameter. If you set it
to false
, CodeIgniter will not try to protect your field or table names.
This is useful if you need a compound select statement where automatic
escaping of fields may break them.
$builder->select('(SELECT SUM(payments.amount) FROM payments WHERE payments.invoice_id=4) AS amount_paid', false);
$query = $builder->get();
$builder->selectMax()
Writes a SELECT MAX(field)
portion for your query. You can optionally
include a second parameter to rename the resulting field.
$builder->selectMax('age');
$query = $builder->get();
// Produces: SELECT MAX(age) as age FROM mytable
$builder->selectMax('age', 'member_age');
$query = $builder->get();
// Produces: SELECT MAX(age) as member_age FROM mytable
$builder->selectMin()
Writes a “SELECT MIN(field)” portion for your query. As with selectMax(), You can optionally include a second parameter to rename the resulting field.
$builder->selectMin('age');
$query = $builder->get();
// Produces: SELECT MIN(age) as age FROM mytable
$builder->selectAvg()
Writes a “SELECT AVG(field)” portion for your query. As with selectMax(), You can optionally include a second parameter to rename the resulting field.
$builder->selectAvg('age');
$query = $builder->get();
// Produces: SELECT AVG(age) as age FROM mytable
$builder->selectSum()
Writes a “SELECT SUM(field)” portion for your query. As with
selectMax()
, You can optionally include a second parameter to rename
the resulting field.
$builder->selectSum('age');
$query = $builder->get();
// Produces: SELECT SUM(age) as age FROM mytable
$builder->selectCount()
Writes a "SELECT COUNT(field)"
portion for your query. As with
selectMax()
, You can optionally include a second parameter to rename
the resulting field.
Note
This method is particularly helpful when used with groupBy()
. For
counting results generally see countAll()
or countAllResults()
.
$builder->selectCount('age');
$query = $builder->get();
// Produces: SELECT COUNT(age) as age FROM mytable
$builder->from()
Permits you to write the FROM portion of your query:
$builder->select('title, content, date');
$builder->from('mytable');
$query = $builder->get();
// Produces: SELECT title, content, date FROM mytable
Note
As shown earlier, the FROM portion of your query can is specified
in the $db->table()
function. Additional calls to from()
will add more tables
to the FROM portion of your query.
$builder->join()
Permits you to write the JOIN portion of your query:
$builder->db->table('blog');
$builder->select('*');
$builder->join('comments', 'comments.id = blogs.id');
$query = $builder->get();
// Produces:
// SELECT * FROM blogs JOIN comments ON comments.id = blogs.id
Multiple function calls can be made if you need several joins in one query.
If you need a specific type of JOIN you can specify it via the third parameter of the function. Options are: left, right, outer, inner, left outer, and right outer.
$builder->join('comments', 'comments.id = blogs.id', 'left');
// Produces: LEFT JOIN comments ON comments.id = blogs.id
Looking for Specific Data¶
$builder->where()
This function enables you to set WHERE clauses using one of four methods:
Note
All values passed to this function are escaped automatically, producing safer queries.
Simple key/value method:
$builder->where('name', $name); // Produces: WHERE name = 'Joe'
Notice that the equal sign is added for you.
If you use multiple function calls they will be chained together with AND between them:
$builder->where('name', $name); $builder->where('title', $title); $builder->where('status', $status); // WHERE name = 'Joe' AND title = 'boss' AND status = 'active'
Custom key/value method:
You can include an operator in the first parameter in order to control the comparison:
$builder->where('name !=', $name); $builder->where('id <', $id); // Produces: WHERE name != 'Joe' AND id < 45
Associative array method:
$array = ['name' => $name, 'title' => $title, 'status' => $status]; $builder->where($array); // Produces: WHERE name = 'Joe' AND title = 'boss' AND status = 'active'
You can include your own operators using this method as well:
$array = ['name !=' => $name, 'id <' => $id, 'date >' => $date]; $builder->where($array);
- Custom string:
You can write your own clauses manually:
$where = "name='Joe' AND status='boss' OR status='active'"; $builder->where($where);
$builder->where()
accepts an optional third parameter. If you set it tofalse
, CodeIgniter will not try to protect your field or table names.$builder->where('MATCH (field) AGAINST ("value")', null, false);
- Subqueries:
You can use an anonymous function to create a subquery.
$builder->where('advance_amount <', function(BaseBuilder $builder) { return $builder->select('MAX(advance_amount)', false)->from('orders')->where('id >', 2); }); // Produces: WHERE "advance_amount" < (SELECT MAX(advance_amount) FROM "orders" WHERE "id" > 2)
$builder->orWhere()
This function is identical to the one above, except that multiple instances are joined by OR
$builder->where('name !=', $name); $builder->orWhere('id >', $id); // Produces: WHERE name != 'Joe' OR id > 50
$builder->whereIn()
Generates a WHERE field IN (‘item’, ‘item’) SQL query joined with AND if appropriate
$names = ['Frank', 'Todd', 'James']; $builder->whereIn('username', $names); // Produces: WHERE username IN ('Frank', 'Todd', 'James')
You can use subqueries instead of an array of values.
$builder->whereIn('id', function(BaseBuilder $builder) { return $builder->select('job_id')->from('users_jobs')->where('user_id', 3); }); // Produces: WHERE "id" IN (SELECT "job_id" FROM "users_jobs" WHERE "user_id" = 3)
$builder->orWhereIn()
Generates a WHERE field IN ('item', 'item')
SQL query joined with OR if
appropriate
$names = ['Frank', 'Todd', 'James']; $builder->orWhereIn('username', $names); // Produces: OR username IN ('Frank', 'Todd', 'James')
You can use subqueries instead of an array of values.
$builder->orWhereIn('id', function(BaseBuilder $builder) { return $builder->select('job_id')->from('users_jobs')->where('user_id', 3); }); // Produces: OR "id" IN (SELECT "job_id" FROM "users_jobs" WHERE "user_id" = 3)
$builder->whereNotIn()
Generates a WHERE field NOT IN (‘item’, ‘item’) SQL query joined with AND if appropriate
$names = ['Frank', 'Todd', 'James']; $builder->whereNotIn('username', $names); // Produces: WHERE username NOT IN ('Frank', 'Todd', 'James')
You can use subqueries instead of an array of values.
$builder->whereNotIn('id', function(BaseBuilder $builder) { return $builder->select('job_id')->from('users_jobs')->where('user_id', 3); }); // Produces: WHERE "id" NOT IN (SELECT "job_id" FROM "users_jobs" WHERE "user_id" = 3)
$builder->orWhereNotIn()
Generates a WHERE field NOT IN ('item', 'item')
SQL query joined with OR
if appropriate
$names = ['Frank', 'Todd', 'James']; $builder->orWhereNotIn('username', $names); // Produces: OR username NOT IN ('Frank', 'Todd', 'James')
You can use subqueries instead of an array of values.
$builder->orWhereNotIn('id', function(BaseBuilder $builder) { return $builder->select('job_id')->from('users_jobs')->where('user_id', 3); }); // Produces: OR "id" NOT IN (SELECT "job_id" FROM "users_jobs" WHERE "user_id" = 3)
Looking for Similar Data¶
$builder->like()
This method enables you to generate LIKE clauses, useful for doing searches.
Note
All values passed to this method are escaped automatically.
Note
All like*
method variations can be forced to perform case-insensitive searches by passing
a fifth parameter of true
to the method. This will use platform-specific features where available
otherwise, will force the values to be lowercase, i.e., WHERE LOWER(column) LIKE '%search%'
. This
may require indexes to be made for LOWER(column)
instead of column
to be effective.
Simple key/value method:
$builder->like('title', 'match'); // Produces: WHERE `title` LIKE '%match%' ESCAPE '!'
If you use multiple method calls they will be chained together with AND between them:
$builder->like('title', 'match'); $builder->like('body', 'match'); // WHERE `title` LIKE '%match%' ESCAPE '!' AND `body` LIKE '%match%' ESCAPE '!'
If you want to control where the wildcard (%) is placed, you can use an optional third argument.
Associative array method:
$array = ['title' => $match, 'page1' => $match, 'page2' => $match]; $builder->like($array); // WHERE `title` LIKE '%match%' ESCAPE '!' AND `page1` LIKE '%match%' ESCAPE '!' AND `page2` LIKE '%match%' ESCAPE '!'
$builder->orLike()
This method is identical to the one above, except that multiple instances are joined by OR:
$builder->like('title', 'match'); $builder->orLike('body', $match);
// WHERE `title` LIKE '%match%' ESCAPE '!' OR `body` LIKE '%match%' ESCAPE '!'
$builder->notLike()
This method is identical to like()
, except that it generates
NOT LIKE statements:
$builder->notLike('title', 'match'); // WHERE `title` NOT LIKE '%match% ESCAPE '!'
$builder->orNotLike()
This method is identical to notLike()
, except that multiple
instances are joined by OR:
$builder->like('title', 'match');
$builder->orNotLike('body', 'match');
// WHERE `title` LIKE '%match% OR `body` NOT LIKE '%match%' ESCAPE '!'
$builder->groupBy()
Permits you to write the GROUP BY portion of your query:
$builder->groupBy("title");
// Produces: GROUP BY title
You can also pass an array of multiple values as well:
$builder->groupBy(["title", "date"]);
// Produces: GROUP BY title, date
$builder->distinct()
Adds the “DISTINCT” keyword to a query
$builder->distinct();
$builder->get();
// Produces: SELECT DISTINCT * FROM mytable
$builder->having()
Permits you to write the HAVING portion of your query. There are 2 possible syntaxes, 1 argument or 2:
$builder->having('user_id = 45'); // Produces: HAVING user_id = 45
$builder->having('user_id', 45); // Produces: HAVING user_id = 45
You can also pass an array of multiple values as well:
$builder->having(['title =' => 'My Title', 'id <' => $id]);
// Produces: HAVING title = 'My Title', id < 45
If you are using a database that CodeIgniter escapes queries for, you
can prevent escaping content by passing an optional third argument, and
setting it to false
.
$builder->having('user_id', 45); // Produces: HAVING `user_id` = 45 in some databases such as MySQL
$builder->having('user_id', 45, false); // Produces: HAVING user_id = 45
$builder->orHaving()
Identical to having()
, only separates multiple clauses with “OR”.
$builder->havingIn()
Generates a HAVING field IN ('item', 'item')
SQL query joined with AND if
appropriate
$groups = [1, 2, 3];
$builder->havingIn('group_id', $groups);
// Produces: HAVING group_id IN (1, 2, 3)
You can use subqueries instead of an array of values.
$builder->havingIn('id', function(BaseBuilder $builder) {
return $builder->select('user_id')->from('users_jobs')->where('group_id', 3);
});
// Produces: HAVING "id" IN (SELECT "user_id" FROM "users_jobs" WHERE "group_id" = 3)
$builder->orHavingIn()
Generates a HAVING field IN ('item', 'item')
SQL query joined with OR if
appropriate
$groups = [1, 2, 3];
$builder->orHavingIn('group_id', $groups);
// Produces: OR group_id IN (1, 2, 3)
You can use subqueries instead of an array of values.
$builder->orHavingIn('id', function(BaseBuilder $builder) {
return $builder->select('user_id')->from('users_jobs')->where('group_id', 3);
});
// Produces: OR "id" IN (SELECT "user_id" FROM "users_jobs" WHERE "group_id" = 3)
$builder->havingNotIn()
Generates a HAVING field NOT IN ('item', 'item')
SQL query joined with
AND if appropriate
$groups = [1, 2, 3];
$builder->havingNotIn('group_id', $groups);
// Produces: HAVING group_id NOT IN (1, 2, 3)
You can use subqueries instead of an array of values.
$builder->havingNotIn('id', function(BaseBuilder $builder) {
return $builder->select('user_id')->from('users_jobs')->where('group_id', 3);
});
// Produces: HAVING "id" NOT IN (SELECT "user_id" FROM "users_jobs" WHERE "group_id" = 3)
$builder->orHavingNotIn()
Generates a HAVING field NOT IN ('item', 'item')
SQL query joined with OR
if appropriate
$groups = [1, 2, 3];
$builder->havingNotIn('group_id', $groups);
// Produces: OR group_id NOT IN (1, 2, 3)
You can use subqueries instead of an array of values.
$builder->orHavingNotIn('id', function(BaseBuilder $builder) {
return $builder->select('user_id')->from('users_jobs')->where('group_id', 3);
});
// Produces: OR "id" NOT IN (SELECT "user_id" FROM "users_jobs" WHERE "group_id" = 3)
$builder->havingLike()
This method enables you to generate LIKE clauses for HAVING part or the query, useful for doing searches.
Note
All values passed to this method are escaped automatically.
Note
All havingLike*
method variations can be forced to perform case-insensitive searches by passing
a fifth parameter of true
to the method. This will use platform-specific features where available
otherwise, will force the values to be lowercase, i.e., HAVING LOWER(column) LIKE '%search%'
. This
may require indexes to be made for LOWER(column)
instead of column
to be effective.
Simple key/value method:
$builder->havingLike('title', 'match'); // Produces: HAVING `title` LIKE '%match%' ESCAPE '!'
If you use multiple method calls they will be chained together with AND between them:
$builder->havingLike('title', 'match'); $builder->havingLike('body', 'match'); // HAVING `title` LIKE '%match%' ESCAPE '!' AND `body` LIKE '%match% ESCAPE '!'
If you want to control where the wildcard (%) is placed, you can use an optional third argument.
Associative array method:
$array = ['title' => $match, 'page1' => $match, 'page2' => $match]; $builder->havingLike($array); // HAVING `title` LIKE '%match%' ESCAPE '!' AND `page1` LIKE '%match%' ESCAPE '!' AND `page2` LIKE '%match%' ESCAPE '!'
$builder->orHavingLike()
This method is identical to the one above, except that multiple instances are joined by OR:
$builder->havingLike('title', 'match'); $builder->orHavingLike('body', $match);
// HAVING `title` LIKE '%match%' ESCAPE '!'
Ordering results¶
$builder->orderBy()
Lets you set an ORDER BY clause.
The first parameter contains the name of the column you would like to order by.
The second parameter lets you set the direction of the result. Options are ASC, DESC AND RANDOM.
$builder->orderBy('title', 'DESC');
// Produces: ORDER BY `title` DESC
You can also pass your own string in the first parameter:
$builder->orderBy('title DESC, name ASC');
// Produces: ORDER BY `title` DESC, `name` ASC
Or multiple function calls can be made if you need multiple fields.
$builder->orderBy('title', 'DESC');
$builder->orderBy('name', 'ASC');
// Produces: ORDER BY `title` DESC, `name` ASC
If you choose the RANDOM direction option, then the first parameters will be ignored, unless you specify a numeric seed value.
$builder->orderBy('title', 'RANDOM');
// Produces: ORDER BY RAND()
$builder->orderBy(42, 'RANDOM');
// Produces: ORDER BY RAND(42)
Note
Random ordering is not currently supported in Oracle and will default to ASC instead.
Limiting or Counting Results¶
$builder->limit()
Lets you limit the number of rows you would like returned by the query:
$builder->limit(10);
// Produces: LIMIT 10
The second parameter lets you set a result offset.
$builder->limit(10, 20);
// Produces: LIMIT 20, 10 (in MySQL. Other databases have slightly different syntax)
$builder->countAllResults()
Permits you to determine the number of rows in a particular Query
Builder query. Queries will accept Query Builder restrictors such as
where()
, orWhere()
, like()
, orLike()
, etc. Example:
echo $builder->countAllResults(); // Produces an integer, like 25
$builder->like('title', 'match');
$builder->from('my_table');
echo $builder->countAllResults(); // Produces an integer, like 17
However, this method also resets any field values that you may have passed
to select()
. If you need to keep them, you can pass false
as the
first parameter.
echo $builder->countAllResults(false); // Produces an integer, like 17
$builder->countAll()
Permits you to determine the number of rows in a particular table. Example:
echo $builder->countAll(); // Produces an integer, like 25
As is in countAllResult method, this method resets any field values that you may have passed
to select()
as well. If you need to keep them, you can pass false
as the
first parameter.
Query grouping¶
Query grouping allows you to create groups of WHERE clauses by enclosing them in parentheses. This will allow you to create queries with complex WHERE clauses. Nested groups are supported. Example:
$builder->select('*')->from('my_table')
->groupStart()
->where('a', 'a')
->orGroupStart()
->where('b', 'b')
->where('c', 'c')
->groupEnd()
->groupEnd()
->where('d', 'd')
->get();
// Generates:
// SELECT * FROM (`my_table`) WHERE ( `a` = 'a' OR ( `b` = 'b' AND `c` = 'c' ) ) AND `d` = 'd'
Note
Groups need to be balanced, make sure every groupStart()
is matched by a groupEnd()
.
$builder->groupStart()
Starts a new group by adding an opening parenthesis to the WHERE clause of the query.
$builder->orGroupStart()
Starts a new group by adding an opening parenthesis to the WHERE clause of the query, prefixing it with ‘OR’.
$builder->notGroupStart()
Starts a new group by adding an opening parenthesis to the WHERE clause of the query, prefixing it with ‘NOT’.
$builder->orNotGroupStart()
Starts a new group by adding an opening parenthesis to the WHERE clause of the query, prefixing it with ‘OR NOT’.
$builder->groupEnd()
Ends the current group by adding a closing parenthesis to the WHERE clause of the query.
$builder->havingGroupStart()
Starts a new group by adding an opening parenthesis to the HAVING clause of the query.
$builder->orHavingGroupStart()
Starts a new group by adding an opening parenthesis to the HAVING clause of the query, prefixing it with ‘OR’.
$builder->notHavingGroupStart()
Starts a new group by adding an opening parenthesis to the HAVING clause of the query, prefixing it with ‘NOT’.
$builder->orNotHavingGroupStart()
Starts a new group by adding an opening parenthesis to the HAVING clause of the query, prefixing it with ‘OR NOT’.
$builder->havingGroupEnd()
Ends the current group by adding a closing parenthesis to the HAVING clause of the query.
Inserting Data¶
$builder->insert()
Generates an insert string based on the data you supply, and runs the query. You can either pass an array or an object to the function. Here is an example using an array:
$data = [
'title' => 'My title',
'name' => 'My Name',
'date' => 'My date',
];
$builder->insert($data);
// Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')
The first parameter is an associative array of values.
Here is an example using an object:
class Myclass
{
public $title = 'My Title';
public $content = 'My Content';
public $date = 'My Date';
}
$object = new Myclass;
$builder->insert($object);
// Produces: INSERT INTO mytable (title, content, date) VALUES ('My Title', 'My Content', 'My Date')
The first parameter is an object.
Note
All values are escaped automatically producing safer queries.
$builder->ignore()
Generates an insert ignore string based on the data you supply, and runs the query. So if an entry with the same primary key already exists, the query won’t be inserted. You can optionally pass an boolean to the function. Here is an example using the array of the above example:
$data = [
'title' => 'My title',
'name' => 'My Name',
'date' => 'My date',
];
$builder->ignore(true)->insert($data);
// Produces: INSERT OR IGNORE INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')
$builder->getCompiledInsert()
Compiles the insertion query just like $builder->insert()
but does not
run the query. This method simply returns the SQL query as a string.
Example:
$data = [
'title' => 'My title',
'name' => 'My Name',
'date' => 'My date',
];
$sql = $builder->set($data)->getCompiledInsert('mytable');
echo $sql;
// Produces string: INSERT INTO mytable (`title`, `name`, `date`) VALUES ('My title', 'My name', 'My date')
The second parameter enables you to set whether or not the query builder query
will be reset (by default it will be–just like $builder->insert()
):
echo $builder->set('title', 'My Title')->getCompiledInsert('mytable', false);
// Produces string: INSERT INTO mytable (`title`) VALUES ('My Title')
echo $builder->set('content', 'My Content')->getCompiledInsert();
// Produces string: INSERT INTO mytable (`title`, `content`) VALUES ('My Title', 'My Content')
The key thing to notice in the above example is that the second query did not
utilize $builder->from()
nor did it pass a table name into the first
parameter. The reason this worked is that the query has not been executed
using $builder->insert()
which resets values or reset directly using
$builder->resetQuery()
.
Note
This method doesn’t work for batch inserts.
$builder->insertBatch()
Generates an insert string based on the data you supply, and runs the query. You can either pass an array or an object to the function. Here is an example using an array:
$data = [
[
'title' => 'My title',
'name' => 'My Name',
'date' => 'My date',
],
[
'title' => 'Another title',
'name' => 'Another Name',
'date' => 'Another date',
],
];
$builder->insertBatch($data);
// Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date'), ('Another title', 'Another name', 'Another date')
The first parameter is an associative array of values.
Note
All values are escaped automatically producing safer queries.
Updating Data¶
$builder->replace()
This method executes a REPLACE statement, which is basically the SQL
standard for (optional) DELETE + INSERT, using PRIMARY and UNIQUE
keys as the determining factor.
In our case, it will save you from the need to implement complex
logics with different combinations of select()
, update()
,
delete()
and insert()
calls.
Example:
$data = [
'title' => 'My title',
'name' => 'My Name',
'date' => 'My date',
];
$builder->replace($data);
// Executes: REPLACE INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')
In the above example, if we assume that the title field is our primary key, then if a row containing ‘My title’ as the title value, that row will be deleted with our new row data replacing it.
Usage of the set()
method is also allowed and all fields are
automatically escaped, just like with insert()
.
$builder->set()
This function enables you to set values for inserts or updates.
It can be used instead of passing a data array directly to the insert or update functions:
$builder->set('name', $name);
$builder->insert();
// Produces: INSERT INTO mytable (`name`) VALUES ('{$name}')
If you use multiple function called they will be assembled properly based on whether you are doing an insert or an update:
$builder->set('name', $name);
$builder->set('title', $title);
$builder->set('status', $status);
$builder->insert();
set() will also accept an optional third parameter ($escape
), that
will prevent data from being escaped if set to false
. To illustrate the
difference, here is set()
used both with and without the escape
parameter.
$builder->set('field', 'field+1', false);
$builder->where('id', 2);
$builder->update();
// gives UPDATE mytable SET field = field+1 WHERE `id` = 2
$builder->set('field', 'field+1');
$builder->where('id', 2);
$builder->update();
// gives UPDATE `mytable` SET `field` = 'field+1' WHERE `id` = 2
You can also pass an associative array to this function:
$array = [
'name' => $name,
'title' => $title,
'status' => $status,
];
$builder->set($array);
$builder->insert();
Or an object:
class Myclass
{
public $title = 'My Title';
public $content = 'My Content';
public $date = 'My Date';
}
$object = new Myclass;
$builder->set($object);
$builder->insert();
$builder->update()
Generates an update string and runs the query based on the data you supply. You can pass an array or an object to the function. Here is an example using an array:
$data = [
'title' => $title,
'name' => $name,
'date' => $date,
];
$builder->where('id', $id);
$builder->update($data);
// Produces:
//
// UPDATE mytable
// SET title = '{$title}', name = '{$name}', date = '{$date}'
// WHERE id = $id
Or you can supply an object:
class Myclass
{
public $title = 'My Title';
public $content = 'My Content';
public $date = 'My Date';
}
$object = new Myclass;
$builder->where('id', $id);
$builder->update($object);
// Produces:
//
// UPDATE `mytable`
// SET `title` = '{$title}', `name` = '{$name}', `date` = '{$date}'
// WHERE id = `$id`
Note
All values are escaped automatically producing safer queries.
You’ll notice the use of the $builder->where()
function, enabling you
to set the WHERE clause. You can optionally pass this information
directly into the update function as a string:
$builder->update($data, "id = 4");
Or as an array:
$builder->update($data, ['id' => $id]);
You may also use the $builder->set()
function described above when
performing updates.
$builder->updateBatch()
Generates an update string based on the data you supply, and runs the query. You can either pass an array or an object to the function. Here is an example using an array:
$data = [
[
'title' => 'My title' ,
'name' => 'My Name 2' ,
'date' => 'My date 2',
],
[
'title' => 'Another title' ,
'name' => 'Another Name 2' ,
'date' => 'Another date 2',
],
];
$builder->updateBatch($data, 'title');
// Produces:
// UPDATE `mytable` SET `name` = CASE
// WHEN `title` = 'My title' THEN 'My Name 2'
// WHEN `title` = 'Another title' THEN 'Another Name 2'
// ELSE `name` END,
// `date` = CASE
// WHEN `title` = 'My title' THEN 'My date 2'
// WHEN `title` = 'Another title' THEN 'Another date 2'
// ELSE `date` END
// WHERE `title` IN ('My title','Another title')
The first parameter is an associative array of values, the second parameter is the where key.
Note
All values are escaped automatically producing safer queries.
Note
affectedRows()
won’t give you proper results with this method,
due to the very nature of how it works. Instead, updateBatch()
returns the number of rows affected.
$builder->getCompiledUpdate()
This works exactly the same way as $builder->getCompiledInsert()
except
that it produces an UPDATE SQL string instead of an INSERT SQL string.
For more information view documentation for $builder->getCompiledInsert()
.
Note
This method doesn’t work for batched updates.
Deleting Data¶
$builder->delete()
Generates a delete SQL string and runs the query.
$builder->delete(['id' => $id]);
// Produces: // DELETE FROM mytable // WHERE id = $id
The first parameter is the where clause.
You can also use the where()
or or_where()
functions instead of passing
the data to the first parameter of the function:
$builder->where('id', $id);
$builder->delete();
// Produces:
// DELETE FROM mytable
// WHERE id = $id
If you want to delete all data from a table, you can use the truncate()
function, or emptyTable()
.
$builder->emptyTable()
Generates a delete SQL string and runs the query:
$builder->emptyTable('mytable');
// Produces: DELETE FROM mytable
$builder->truncate()
Generates a truncate SQL string and runs the query.
$builder->truncate();
// Produce:
// TRUNCATE mytable
Note
If the TRUNCATE command isn’t available, truncate()
will
execute as “DELETE FROM table”.
$builder->getCompiledDelete()
This works exactly the same way as $builder->getCompiledInsert()
except
that it produces a DELETE SQL string instead of an INSERT SQL string.
For more information view documentation for $builder->getCompiledInsert()
.
Method Chaining¶
Method chaining allows you to simplify your syntax by connecting multiple functions. Consider this example:
$query = $builder->select('title')
->where('id', $id)
->limit(10, 20)
->get();
Resetting Query Builder¶
$builder->resetQuery()
Resetting Query Builder allows you to start fresh with your query without
executing it first using a method like $builder->get()
or $builder->insert()
.
This is useful in situations where you are using Query Builder to generate SQL
(e.g., $builder->getCompiledSelect()
) but then choose to, for instance,
run the query:
// Note that the second parameter of the ``get_compiled_select`` method is false
$sql = $builder->select(['field1','field2'])
->where('field3',5)
->getCompiledSelect(false);
// ...
// Do something crazy with the SQL code... like add it to a cron script for
// later execution or something...
// ...
$data = $builder->get()->getResultArray();
// Would execute and return an array of results of the following query:
// SELECT field1, field1 from mytable where field3 = 5;
Class Reference¶
-
CodeIgniter\Database\BaseBuilder
-
db
()¶ Returns: The database connection in use Return type: ConnectionInterface
Returns the current database connection from
$db
. Useful for accessingConnectionInterface
methods that are not directly available to the Query Builder, likeinsertID()
orerrors()
.
-
resetQuery
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Resets the current Query Builder state. Useful when you want to build a query that can be canceled under certain conditions.
-
countAllResults
([$reset = true])¶ Parameters: - $reset (bool) – Whether to reset values for SELECTs
Returns: Number of rows in the query result
Return type: int
Generates a platform-specific query string that counts all records returned by an Query Builder query.
-
countAll
([$reset = true])¶ Parameters: - $reset (bool) – Whether to reset values for SELECTs
Returns: Number of rows in the query result
Return type: int
Generates a platform-specific query string that counts all records in the particular table.
-
get
([$limit = null[, $offset = null[, $reset = true]]]])¶ Parameters: - $limit (int) – The LIMIT clause
- $offset (int) – The OFFSET clause
- $reset (bool) – Do we want to clear query builder values?
Returns: \CodeIgniter\Database\ResultInterface
instance (method chaining)Return type: \CodeIgniter\Database\ResultInterface
Compiles and runs
SELECT
statement based on the already called Query Builder methods.
-
getWhere
([$where = null[, $limit = null[, $offset = null[, $reset = true]]]]])¶ Parameters: - $where (string) – The WHERE clause
- $limit (int) – The LIMIT clause
- $offset (int) – The OFFSET clause
- $reset (bool) – Do we want to clear query builder values?
Returns: \CodeIgniter\Database\ResultInterface
instance (method chaining)Return type: \CodeIgniter\Database\ResultInterface
Same as
get()
, but also allows the WHERE to be added directly.
-
select
([$select = '*'[, $escape = null]])¶ Parameters: - $select (string) – The SELECT portion of a query
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
SELECT
clause to a query.
-
selectAvg
([$select = ''[, $alias = '']])¶ Parameters: - $select (string) – Field to compute the average of
- $alias (string) – Alias for the resulting value name
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
SELECT AVG(field)
clause to a query.
-
selectMax
([$select = ''[, $alias = '']])¶ Parameters: - $select (string) – Field to compute the maximum of
- $alias (string) – Alias for the resulting value name
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
SELECT MAX(field)
clause to a query.
-
selectMin
([$select = ''[, $alias = '']])¶ Parameters: - $select (string) – Field to compute the minimum of
- $alias (string) – Alias for the resulting value name
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
SELECT MIN(field)
clause to a query.
-
selectSum
([$select = ''[, $alias = '']])¶ Parameters: - $select (string) – Field to compute the sum of
- $alias (string) – Alias for the resulting value name
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
SELECT SUM(field)
clause to a query.
-
selectCount
([$select = ''[, $alias = '']])¶ Parameters: - $select (string) – Field to compute the average of
- $alias (string) – Alias for the resulting value name
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
SELECT COUNT(field)
clause to a query.
-
distinct
([$val = true])¶ Parameters: - $val (bool) – Desired value of the “distinct” flag
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Sets a flag which tells the query builder to add a
DISTINCT
clause to theSELECT
portion of the query.
-
from
($from[, $overwrite = false])¶ Parameters: - $from (mixed) – Table name(s); string or array
- $overwrite (bool) – Should we remove the first table existing?
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Specifies the
FROM
clause of a query.
-
join
($table, $cond[, $type = ''[, $escape = null]])¶ Parameters: - $table (string) – Table name to join
- $cond (string) – The JOIN ON condition
- $type (string) – The JOIN type
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
JOIN
clause to a query.
-
where
($key[, $value = null[, $escape = null]])¶ Parameters: - $key (mixed) – Name of field to compare, or associative array
- $value (mixed) – If a single key, compared to this value
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Generates the
WHERE
portion of the query. Separates multiple calls withAND
.
-
orWhere
($key[, $value = null[, $escape = null]])¶ Parameters: - $key (mixed) – Name of field to compare, or associative array
- $value (mixed) – If a single key, compared to this value
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Generates the
WHERE
portion of the query. Separates multiple calls withOR
.
-
orWhereIn
([$key = null[, $values = null[, $escape = null]]])¶ Parameters: - $key (string) – The field to search
- $values (array|Closure) – Array of target values, or anonymous function for subquery
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Generates a
WHERE
fieldIN('item', 'item')
SQL query, joined withOR
if appropriate.
-
orWhereNotIn
([$key = null[, $values = null[, $escape = null]]])¶ Parameters: - $key (string) – The field to search
- $values (array|Closure) – Array of target values, or anonymous function for subquery
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Generates a
WHERE
fieldNOT IN('item', 'item')
SQL query, joined withOR
if appropriate.
-
whereIn
([$key = null[, $values = null[, $escape = null]]])¶ Parameters: - $key (string) – Name of field to examine
- $values (array|Closure) – Array of target values, or anonymous function for subquery
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Generates a
WHERE
fieldIN('item', 'item')
SQL query, joined withAND
if appropriate.
-
whereNotIn
([$key = null[, $values = null[, $escape = null]]])¶ Parameters: - $key (string) – Name of field to examine
- $values (array|Closure) – Array of target values, or anonymous function for subquery
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Generates a
WHERE
fieldNOT IN('item', 'item')
SQL query, joined withAND
if appropriate.
-
groupStart
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Starts a group expression, using
AND
for the conditions inside it.
-
orGroupStart
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Starts a group expression, using
OR
for the conditions inside it.
-
notGroupStart
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Starts a group expression, using
AND NOT
for the conditions inside it.
-
orNotGroupStart
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Starts a group expression, using
OR NOT
for the conditions inside it.
-
groupEnd
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Ends a group expression.
-
like
($field[, $match = ''[, $side = 'both'[, $escape = null[, $insensitiveSearch = false]]]])¶ Parameters: - $field (string) – Field name
- $match (string) – Text portion to match
- $side (string) – Which side of the expression to put the ‘%’ wildcard on
- $escape (bool) – Whether to escape values and identifiers
- $insensitiveSearch (bool) – Whether to force a case-insensitive search
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
LIKE
clause to a query, separating multiple calls withAND
.
-
orLike
($field[, $match = ''[, $side = 'both'[, $escape = null[, $insensitiveSearch = false]]]])¶ Parameters: - $field (string) – Field name
- $match (string) – Text portion to match
- $side (string) – Which side of the expression to put the ‘%’ wildcard on
- $escape (bool) – Whether to escape values and identifiers
- $insensitiveSearch (bool) – Whether to force a case-insensitive search
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
LIKE
clause to a query, separating multiple class withOR
.
-
notLike
($field[, $match = ''[, $side = 'both'[, $escape = null[, $insensitiveSearch = false]]]])¶ Parameters: - $field (string) – Field name
- $match (string) – Text portion to match
- $side (string) – Which side of the expression to put the ‘%’ wildcard on
- $escape (bool) – Whether to escape values and identifiers
- $insensitiveSearch (bool) – Whether to force a case-insensitive search
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
NOT LIKE
clause to a query, separating multiple calls withAND
.
-
orNotLike
($field[, $match = ''[, $side = 'both'[, $escape = null[, $insensitiveSearch = false]]]])¶ Parameters: - $field (string) – Field name
- $match (string) – Text portion to match
- $side (string) – Which side of the expression to put the ‘%’ wildcard on
- $escape (bool) – Whether to escape values and identifiers
- $insensitiveSearch (bool) – Whether to force a case-insensitive search
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
NOT LIKE
clause to a query, separating multiple calls withOR
.
-
having
($key[, $value = null[, $escape = null]])¶ Parameters: - $key (mixed) – Identifier (string) or associative array of field/value pairs
- $value (string) – Value sought if $key is an identifier
- $escape (string) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
HAVING
clause to a query, separating multiple calls withAND
.
-
orHaving
($key[, $value = null[, $escape = null]])¶ Parameters: - $key (mixed) – Identifier (string) or associative array of field/value pairs
- $value (string) – Value sought if $key is an identifier
- $escape (string) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
HAVING
clause to a query, separating multiple calls withOR
.
-
orHavingIn
([$key = null[, $values = null[, $escape = null]]])¶ Parameters: - $key (string) – The field to search
- $values (array|Closure) – Array of target values, or anonymous function for subquery
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Generates a
HAVING
field IN(‘item’, ‘item’) SQL query, joined withOR
if appropriate.
-
orHavingNotIn
([$key = null[, $values = null[, $escape = null]]])¶ Parameters: - $key (string) – The field to search
- $values (array|Closure) – Array of target values, or anonymous function for subquery
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Generates a
HAVING
fieldNOT IN('item', 'item')
SQL query, joined withOR
if appropriate.
-
havingIn
([$key = null[, $values = null[, $escape = null]]])¶ Parameters: - $key (string) – Name of field to examine
- $values (array|Closure) – Array of target values, or anonymous function for subquery
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Generates a
HAVING
fieldIN('item', 'item')
SQL query, joined withAND
if appropriate.
-
havingNotIn
([$key = null[, $values = null[, $escape = null]]])¶ Parameters: - $key (string) – Name of field to examine
- $values (array|Closure) – Array of target values, or anonymous function for subquery
- $escape (bool) – Whether to escape values and identifiers
- $insensitiveSearch (bool) – Whether to force a case-insensitive search
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Generates a
HAVING
fieldNOT IN('item', 'item')
SQL query, joined withAND
if appropriate.
-
havingLike
($field[, $match = ''[, $side = 'both'[, $escape = null[, $insensitiveSearch = false]]]])¶ Parameters: - $field (string) – Field name
- $match (string) – Text portion to match
- $side (string) – Which side of the expression to put the ‘%’ wildcard on
- $escape (bool) – Whether to escape values and identifiers
- $insensitiveSearch (bool) – Whether to force a case-insensitive search
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
LIKE
clause to aHAVING
part of the query, separating multiple calls withAND
.
-
orHavingLike
($field[, $match = ''[, $side = 'both'[, $escape = null[, $insensitiveSearch = false]]]])¶ Parameters: - $field (string) – Field name
- $match (string) – Text portion to match
- $side (string) – Which side of the expression to put the ‘%’ wildcard on
- $escape (bool) – Whether to escape values and identifiers
- $insensitiveSearch (bool) – Whether to force a case-insensitive search
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
LIKE
clause to aHAVING
part of the query, separating multiple class withOR
.
-
notHavingLike
($field[, $match = ''[, $side = 'both'[, $escape = null[, $insensitiveSearch = false]]]])¶ Parameters: - $field (string) – Field name
- $match (string) – Text portion to match
- $side (string) – Which side of the expression to put the ‘%’ wildcard on
- $escape (bool) – Whether to escape values and identifiers
- $insensitiveSearch (bool) – Whether to force a case-insensitive search
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
NOT LIKE
clause to aHAVING
part of the query, separating multiple calls withAND
.
-
orNotHavingLike
($field[, $match = ''[, $side = 'both'[, $escape = null[, $insensitiveSearch = false]]]])¶ Parameters: - $field (string) – Field name
- $match (string) – Text portion to match
- $side (string) – Which side of the expression to put the ‘%’ wildcard on
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
NOT LIKE
clause to aHAVING
part of the query, separating multiple calls withOR
.
-
havingGroupStart
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Starts a group expression for
HAVING
clause, usingAND
for the conditions inside it.
-
orHavingGroupStart
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Starts a group expression for
HAVING
clause, usingOR
for the conditions inside it.
-
notHavingGroupStart
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Starts a group expression for
HAVING
clause, usingAND NOT
for the conditions inside it.
-
orNotHavingGroupStart
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Starts a group expression for
HAVING
clause, usingOR NOT
for the conditions inside it.
-
havingGroupEnd
()¶ Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Ends a group expression for
HAVING
clause.
-
groupBy
($by[, $escape = null])¶ Parameters: - $by (mixed) – Field(s) to group by; string or array
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds a
GROUP BY
clause to a query.
-
orderBy
($orderby[, $direction = ''[, $escape = null]])¶ Parameters: - $orderby (string) – Field to order by
- $direction (string) – The order requested - ASC, DESC or random
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds an
ORDER BY
clause to a query.
-
limit
($value[, $offset = 0])¶ Parameters: - $value (int) – Number of rows to limit the results to
- $offset (int) – Number of rows to skip
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds
LIMIT
andOFFSET
clauses to a query.
-
offset
($offset)¶ Parameters: - $offset (int) – Number of rows to skip
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds an
OFFSET
clause to a query.
-
set
($key[, $value = ''[, $escape = null]])¶ Parameters: - $key (mixed) – Field name, or an array of field/value pairs
- $value (string) – Field value, if $key is a single field
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds field/value pairs to be passed later to
insert()
,update()
orreplace()
.
-
insert
([$set = null[, $escape = null]])¶ Parameters: - $set (array) – An associative array of field/value pairs
- $escape (bool) – Whether to escape values and identifiers
Returns: true
on success,false
on failureReturn type: bool
Compiles and executes an
INSERT
statement.
-
insertBatch
([$set = null[, $escape = null[, $batch_size = 100]]])¶ Parameters: - $set (array) – Data to insert
- $escape (bool) – Whether to escape values and identifiers
- $batch_size (int) – Count of rows to insert at once
Returns: Number of rows inserted or
false
on failureReturn type: int|false
Compiles and executes batch
INSERT
statements.Note
When more than
$batch_size
rows are provided, multipleINSERT
queries will be executed, each trying to insert up to$batch_size
rows.
-
setInsertBatch
($key[, $value = ''[, $escape = null]])¶ Parameters: - $key (mixed) – Field name or an array of field/value pairs
- $value (string) – Field value, if $key is a single field
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds field/value pairs to be inserted in a table later via
insertBatch()
.
-
update
([$set = null[, $where = null[, $limit = null]]])¶ Parameters: - $set (array) – An associative array of field/value pairs
- $where (string) – The WHERE clause
- $limit (int) – The LIMIT clause
Returns: true
on success,false
on failureReturn type: bool
Compiles and executes an
UPDATE
statement.
-
updateBatch
([$set = null[, $value = null[, $batch_size = 100]]])¶ Parameters: - $set (array) – Field name, or an associative array of field/value pairs
- $value (string) – Field value, if $set is a single field
- $batch_size (int) – Count of conditions to group in a single query
Returns: Number of rows updated or
false
on failureReturn type: int|false
Compiles and executes batch
UPDATE
statements.Note
When more than
$batch_size
field/value pairs are provided, multiple queries will be executed, each handling up to$batch_size
field/value pairs.
-
setUpdateBatch
($key[, $value = ''[, $escape = null]])¶ Parameters: - $key (mixed) – Field name or an array of field/value pairs
- $value (string) – Field value, if $key is a single field
- $escape (bool) – Whether to escape values and identifiers
Returns: BaseBuilder
instance (method chaining)Return type: BaseBuilder
Adds field/value pairs to be updated in a table later via
updateBatch()
.
-
replace
([$set = null])¶ Parameters: - $set (array) – An associative array of field/value pairs
Returns: true
on success,false
on failureReturn type: bool
Compiles and executes a
REPLACE
statement.
-
delete
([$where = ''[, $limit = null[, $reset_data = true]]])¶ Parameters: - $where (string) – The WHERE clause
- $limit (int) – The LIMIT clause
- $reset_data (bool) – true to reset the query “write” clause
Returns: BaseBuilder
instance (method chaining) orfalse
on failureReturn type: BaseBuilder|false
Compiles and executes a
DELETE
query.
-
increment
($column[, $value = 1])¶ Parameters: - $column (string) – The name of the column to increment
- $value (int) – The amount to increment in the column
Increments the value of a field by the specified amount. If the field is not a numeric field, like a
VARCHAR
, it will likely be replaced with$value
.
-
decrement
($column[, $value = 1])¶ Parameters: - $column (string) – The name of the column to decrement
- $value (int) – The amount to decrement in the column
Decrements the value of a field by the specified amount. If the field is not a numeric field, like a
VARCHAR
, it will likely be replaced with$value
.
-
truncate
()¶ Returns: true
on success,false
on failure, string on test modeReturn type: bool|string Executes a
TRUNCATE
statement on a table.Note
If the database platform in use doesn’t support
TRUNCATE
, aDELETE
statement will be used instead.
-
emptyTable
()¶ Returns: true
on success,false
on failureReturn type: bool Deletes all records from a table via a
DELETE
statement.
-
getCompiledSelect
([$reset = true])¶ Parameters: - $reset (bool) – Whether to reset the current QB values or not
Returns: The compiled SQL statement as a string
Return type: string
Compiles a
SELECT
statement and returns it as a string.
-
getCompiledInsert
([$reset = true])¶ Parameters: - $reset (bool) – Whether to reset the current QB values or not
Returns: The compiled SQL statement as a string
Return type: string
Compiles an
INSERT
statement and returns it as a string.
-
getCompiledUpdate
([$reset = true])¶ Parameters: - $reset (bool) – Whether to reset the current QB values or not
Returns: The compiled SQL statement as a string
Return type: string
Compiles an
UPDATE
statement and returns it as a string.
-
getCompiledDelete
([$reset = true])¶ Parameters: - $reset (bool) – Whether to reset the current QB values or not
Returns: The compiled SQL statement as a string
Return type: string
Compiles a
DELETE
statement and returns it as a string.
-


CNIT 133 HW5 Part 3 - Information on Select States
Please enter State Name or State Abbreviation:
State Name
State Capitol
Population
Display Instructions
Enter a state abbreviation or name (lower or upper case is ok)


In some sort of crude sense which no vulgarity, no humor, no
overstatement can quite extinguish, the physicists have known sin;
and this is a knowledge which they cannot lose.
J. Robert Oppenheimer
Concurrent with the preparations for the Trinity test, preparations were being made for the delivery of operational atomic weapons to Tinian Island in the Pacific for use against Japan at the earliest possible date.
Two weapon designs were available for use - the gun assembly Little Boy bomb that used uranium highly enriched in U-235, and the implosion assembly Fat Man that used plutonium.
At the National Atomic Energy Museum, Albuquerque, New Mexico, USA, representative weapon casings for the Little Boy and Fat Man type weapons are on display.
Little Boy and Fat Man (136 K)After the detonation of the first plutonium bomb core in the Trinity test, the next weapon that was available was the completed Little Boy. It was this weapon that was dropped on Hiroshima. Another Little Boy weapon would not have been ready for months, for this reason only one Little Boy unit was prepared. In contrast many Fat Man bomb assemblies were on hand (without plutonium), and the actual "Fat Man bomb" delivered against Japan only existed when assembly of the Fat Man unit with the plutonium core was completed shortly before the mission.
Little Boy bomb before use in combat (75 K)
| Designation | Mk-I "Little Boy" | Mk-III "Fat Man" | Width | 28 in. | 60.25 in. | Length | 120 in. | 128 in. | Weight | 8,900 lb. | 10,300 lb. | Yield | 15 - 16 Kt | 21 Kt |
|---|
The second plutonium bomb core was delivered to Tinian for use in the first deliverable Fat Man weapon against Kokura arsenal only days after the arrival of Little Boy. Due to weather problems related problems, the Kokura primary target was scrubbed and the secondary target Nagasaki was bombed.
Fat Man Blue Print (73 K)
Fat Man bomb assembly being prepared for testing at the US Navy Saltwells ordnance facility near Inyokern, California (now China Lake Naval Weapons Center, near Ridgecrest, California):
Buttons of refined plutonium metal used in the second bomb core, dropped on Nagasaki (40 K)
Click here for a close up view of the plutonium buttons (145 K)
Below are images of the actual Fat Man bomb that was dropped on Nagasaki assembled and ready for combat.
Assembled Fat Man bomb at Tinian Island (27 K)
|
640x467, 56 K |
Fat Man bomb being prepared for loading on the B-29 Bock's Car |
| Click for big image (954x646, 114 K) |


This pizza is bad for your health! Bad, but extremely tasty!
thank you very much
thank you somehow
thank you a bit
thank you not at all


Technical documentation of Todolistme
The architecture of this application is based on the MVC model. The pattern is composed of three types of modules with three different responsibilities: models, views and controllers.
- A Model contains the data to display.
- A View contains the presentation of the graphical interface.
- A Controller contains the logic concerning the actions performed by the user.
Check this link for more information about the MVC model


In years gone by, we were a traditional IT company. We had teams of developers and operations. They rarely mixed. Around nine months ago we started to really try and get these teams working together. We introduced a configuration management tool, Puppet, into our ecosystem.
Configuration management is one of the steps of continuous delivery that developers often forget. They feel that systems are magically created for them to deploy their application to. I used to believe this. When I was focused on developing software, I never gave any thought as to the work our operations team had to do to keep the train on the track. So give some respect to your operations teams! We created a repository and started to experiment by configuring some of our applications using Puppet.
This was a major step for both sets of teams. The developers started being in charge of the configuration of their application. This meant that their application would guarantee to be configured the same in our CI environment as it was in production. We, as developers, would be more confident of our applications working as expected.
To contribute to the project, as an engineer, you need to:
- fork the project
- make the changes you require
- test the changes in a Vagrant environment (already created with a Windows and Linux system)
- send a PR (pull request)
We have just merged our #847 pull request. The stats of the repository look as follows:
Our puppet repository has had contributions from over 40% of our engineering / operations teams. We use Puppet to manage our application servers, DHCP servers, provisioning systems and even our MS Sql Server continuous integration infrastructure. The adoption has been fantastic. We started by running our internal QA infrastructure and then scaled it out to our production infrastructure. We now manage 548 nodes (a combination of internal and production) via Puppet.
Using a project called Gource, one of our engineering leads, Ryan Tomlinson, created a video of the repository vizualization. It’s just over two minutes long and shows the activity the repository has taken.
Each branch in the tree relates to a directory inside our repository. Green zaps are additions, orange are updates and red deletions. The important thing to take from the video is the evolution of the repository, the amount of changes and the number of people pushing those changes.
I’m very happy with our configuration management adoption. We are by no means at a point where everyone does it, but we are working towards that. I would like our contributors to rise to over 75% of our engineering / operations team by the end of 2014. Let’s see how that goes…


By default, you’ll get a test
folder with Minitest ready to rock when you generate a new rails project. Switching to the other team is a cinch though.
To generate a new rails project without a test suite, run:
Terminal
$ |
|
Or to get rid of your Minitest folder in an existing project:
Terminal
$ |
|
Next, add RSpec to your Gemfile:
1
|
|
Install the new gem:
Terminal
$ |
|
Then install RSpec:
Terminal
$ |
|
Look at you go, with your fresh new spec
folder in the root directory. Get testing!


For this purpose we introduce a new grid parameter - rowTotal. When set, this paramater (again with loadonce parameter set to true) instruct the server to load the total number of rows needed to work on.
Note that rowNum determines the total records displayed in the grid, while rowTotal the total rows on wich we operate.
When this parameter is set we send a aditional parameter to server named totalrows.
Setting rowTotal to rowTotal = -1 loads all the data from the query.
Setting rowTotal to any number greater than 0 (zero) (usually this should be greater than rowNum) loads only this number of rows.
Below is example, where we load all the data and then we operate on it locally.
grid.php
<?php // include the database connection settings/configuration require_once 'jq-config.php'; // include the jqGrid Class require_once "php/jqGrid.php"; // include the driver class require_once "php/jqGridPdo.php"; // connection to the server $conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD); // instruct the database that we use utf-8 encoding $conn->query("SET NAMES utf8"); // Create the jqGrid instance $grid = new jqGridRender($conn); // set the SQL select query $grid->SelectCommand = 'SELECT OrderID, OrderDate, CustomerID, ShipName, Freight FROM orders'; // Set output format to json $grid->dataType = 'json'; // Let the grid automatically create the model based on the SQL query $grid->setColModel(); // Set the url from where we obtain the data $grid->setUrl('grid.php'); // Set some grid options $grid->setGridOptions(array( "rowNum"=>10, "rowList"=>array(10,20,30), "sortname"=>"OrderID", //this instruct grid to load data only once and then go to local mode "loadonce"=>true, //this instruct grid to load all the data from the query. //If you want by example to load only 500 records, the set it to 500 "rowTotal" => -1 )); //enable navigator, so that we can search $grid->navigator = true; $grid->setNavOptions('navigator', array("excel"=>false,"add"=>false,"edit"=>false,"del"=>false,"view"=>true, "search"=>true)); $grid->renderGrid('#grid','#pager',true, null, null, true,true); $conn = null; ?>


Join the numbers and get to the 2048 tile!
Note: this is not the original game, but one modified so the 2s and 4s appear in the worst place possible. To play the original game go here.
Modified by Haeyong (David): when you press "Auto-run", a dialog box will come up asking for the number of iterations to run the "auto-run" for. Once the number of iterations is completed, in the javascript console, an array of how often each number (2,4,8, etc.) appeared during those runs will show up; you should be able to see how many times each value showed up during those iterations plus the values that were already on the board from the start. By observing the frequency of each number, you can see if the number of times each number appears exhibits an asymptotic behavior as the number of iterations increases.
I didn't want to get rid of the animation, so I made the animation speed up instead. Enjoy!
How to play: Use your arrow keys to move the tiles. When two tiles with the same number touch, they merge into one!
Difficulty settings:
Using: this section will determine which values can be generated on the grid by the computer. The default is to generate both 2s and 4s. Switch it to 2s only if you want an easier game, or increase it for fun.
Created by Gabriele Cirulli. Based on 1024 by Veewo Studio and conceptually similar to Threes by Asher Vollmer.
AI solver by Matt Overlan
Hard version by Zsolt Sz. Sztupak.


Home
This test aims to check the behavior of a Touch event during a
transition.
Test case #1
From the "Home" view, whatever the area of the list item "View1"
that you touch, you should transition to the view "View1" without
the keypad focused on the input field.
Test case #2
From the "Home" view, whatever the area of the list item "View2"
that you touch, you should transition to the view "View2" without
altering the value under the item "ListItem B".


Ouroboros Wacah Chan
The Eaten Tree of Life
CC BY
André Ourednik
Sources :
https://www.uniprot.org/ (live requests to SPARQL endpoint)
https://api.inaturalist.org [images] (live requests to API)
Countries loaded.
Loading graph data from uniprot.org...
Loading list of countries...
Updatig graph...


Example text.
Table of Contents
The UTF-8 quote character in this table used to cause python to go boom. Now docutils just silently ignores it.
| Travis | http://travis-ci.org/tony/pullv |
| Docs | http://pullv.rtfd.org |
| API | http://pullv.readthedocs.org/en/latest/api.html |
| Issues | https://github.com/tony/pullv/issues |
| Source | https://github.com/tony/pullv |
| 123456789 123456789 123456789 123456789 123456789 1: | |
|---|---|
| Uh-oh! This name is too long! | |
| 123456789 123456789 123456789 123456789<PHONE_NUMBER>: | this is a long name, but no problem! |
| 123456789 12345: | this is not so long, but long enough for the default! |
| 123456789 1234: | this should work even with the default :) |


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 4
Pheasant is a wonderful meat to use in this flavour-packed salad - if you can't get hold of the unusual salad leaves any good-quality leaves will do.
Preheat the oven to 160C/140C Fan/Gas 3
Wrap the pheasant in the pancetta and stuff the cavity with thyme. Heat the vegetable oil in an ovenproof pan, or a roasting tin. When hot, brown the pheasant on all sides.
Add the Marsala to the pan then roast for 40 minutes.
Remove from the oven and leave to rest for 10 minutes.
Pour the roasting juices into a bowl, skim off any excess fat, and reserve. Remove the pancetta and reserve.
Remove the breasts and legs from the pheasant. Peel off the skin and cut around the leg bones to remove as much meat as possible. Tear the meat into pieces and add them to the reserved juices. Season with salt and pepper and set aside.
Put the radicchio and dandelion leaves into a large bowl. Mix the balsamic vinegar and olive oil to make a dressing. Season with salt and pepper.
Toss the salad with the dressing and place on a large serving plate.
Scatter over the pieces of pheasant with the juice.
Scoop out the insides of the chestnuts and place them on top. Add the pomegranate seeds and mint. Finally chop the reserved pancetta and sprinkle over the top.


Law Union Insurance, Unity Bank and CHI Plc lead gainers’ chart on Tuesday
by Samuel OyekanmiThe market ended today in negative territory as the All-share index dropped by 0.10% to close at 26,375.35 basis points. However, Law Union Insurance Plc, Unity Bank Plc, Consolidated Hallmark Insurance Plc, Ecobank Transnational Plc and FCMB led the gainers’ chart while UAC-PROP, Honey well flour Plc, Nestle Nigeria Plc, AIICO Insurance and Guinness Nigeria Plc topped on the flip side.
Top gainers
Law Union & Rock Insurance Plc was the best performing stock today as it gained 9.52% to close at N0.46, followed by Unity bank Plc which gained 9.43% to end the day’s trade at N0.58. Consolidated Hallmark Insurance Plc gained 7.89% to close at N0.41, Ecobank Transnational Incorporated Plc gained 7.69% to close at N7 while FCMB completed the list with an increase of 6.88% to close at N1.71.
Top Losers
On the flip side, UACN Property Development Company Plc, lost the highest with a decline of 9.35% to close at N0.97 followed by Honeywell flour mill Plc which lost 5.77% to close at N0.98 today. Nestle Nigeria Plc also lost 4.16% to close the day’s trade at N1,150. AIICO insurance Plc declined by 2.86% to close at N0.68 as Guinness Nigeria Plc rounded the list to close at N23.3 recording a decline of 2.31%.
Top trades by Volume
Aside being the best performing stock on the bourse of the NSE, Law Union Insurance Plc, was the most actively traded stock today with trades of 70.4 million shares valued at N29.6 million across 4 deals followed by UBA which traded 51.8 million shares at N335.4 million across 281 deals.
Zenith Bank stock was also highly traded on the bourse today as it traded 50.4 million shares valued at N877.05 million in 519 deals followed by Guaranty Trust bank having traded 26.02 million shares valued at N678.03 million in 280 deals while Guinness Nigeria Plc despite having a poor performance today in terms of share price, rounded off the most actively traded stocks today as it traded 18.8 million shares valued at N438.6 million across 71 deals.


Connect to HEALTH & SOCIETIES-LPS in the Course Register.
HEALTH & SOCIETIES
HSOC-238 INTRO TO MED ANTHRO 1 CU HUMANITIES & SOCIAL SCIENCE SECTOR 601 LEC M 6-9PM MUSE 329 HALLOWELL E CROSS LISTED: ANTH-238 SECTION MAX: 15 MAX W/CROSS LIST: 30 HSOC-259 INTR COMPLE & ALTERN MED 1 CU 601 LEC W 5-8PM COHN 237 MACKENZIE E MAX: 16 HSOC-275 MEDICAL SOCIOLOGY 1 CU 601 LEC W 6-9PM MCNB 285 JOYCE C CROSS LISTED: SOCI-275 SECTION MAX: 13 MAX W/CROSS LIST: 26
Return to Course & Room Roster
Comments to:
Office of the University Registrar
University of Pennsylvania
Room 221 Franklin Building
3451 Walnut Street
Philadelphia, PA 19104-6291
Phone:<PHONE_NUMBER> Fax:<PHONE_NUMBER>
<EMAIL_ADDRESS>Updated: Sat Jan 17 08:30:02 2015


MALAPPURAM
Malappuram is one of the 14 districts in the Indian state of Kerala, with a coastline of 70 km (43 mi). It is the most populous district of Kerala, which is home to around 13% of the total population of the state.The district was formed on 16 June 1969. It spans an area of about 3,554 km2 (1,372 sq mi), making it the third-largest district of Kerala by area. It is the largest district of Kerala with the Western Ghats and the Arabian Sea on the eastern and the western borders respectively. It is the third major contributing district to the Gross State Domestic Product of Kerala as of 2019, after Ernakulam and Thiruvananthapuram.>


twitter
Github
Hi! My name is Brittani and this is some
work I've done over the past few years.
My Portfolio
SHE WRITES
WAX MELT LABEL FOR THE CANDLE BAKERY
THE CANDLE BAKERY
ROOM SPRAY LABEL FOR THE CANDLE BAKERY
JUST BE PODCAST
BUSINESS CARD MOCKUP FOR AYANA'S TRESSES
COOKIE MELT BOX CONCEPT #1 FOR THE CANDLE BAKERY
wireframe
|
|
BRITTANISOCIAL.COM
|
|


Minexx is revolutionizing the mineral value chain from earth to tech.
The artisanal mining industry is the most unsophisticated $100Bn market in the world, impacting 250 million and growing lives.
Miners, at the start of an long and opaque value chain, work in high risk while living in porverty, with no access to loans or life improving services.
The price breakdown of an $800 smartphone demonstrates this – all raw materials combined cost merely $1.
By developing the MineSmart platform, Minexx allows tracking mineral purchases throughout the value chain, all the way from the buyer to the individual miners.
Minnex thereby ensures that all miners are payed fairly, including the 40% of miners that are women and subject to unfair treatment. On the opposite side of the value chain, companies are able to guarantee that the minerals they have purchased come from ethical and sustainable sources.
Invest in real mining sites in Central Africa, mining real minerals such as gold, tin and cobalt. Collect monthly returns linked with the profit made by the fund as your token appreciates.
See your investment improve the lives of Artisanal Miners and small scale community mine sites. By investing with us, you can see the lives of the miners you help drastically improve with our blockchain verified investment system.
As our tokens are traded on the Ethereum blockchain, all our transactions are fully transparent from the mines in Central Africa to the phone in your pocket.
Worried about investment risks? Need help tracking your investment?
Purchase minerals safely and securely using our MineSmart service, be assured that your payment is being sent to registered miners who are treated ethically and payed a fair price.
If you are an Artisanal Miner and would like support with your mine or you would be interested in setting up a mine in Central Africa, contact us and the Artisanal Transformational Impact Fund will review your application for assistance and if succesful, the fund will grant you with suitable resources to improve your mine!


Your PRIME Enrolment is under review by the Ministry of Health. You will be notified once your application has been reviewed.
Questions about your enrolment should be directed to:


- Usage Restrictions
- not published
- Description
- The Transient Documents Content Provider (TDCP) implements a
ContentProvider for the UniversalContentBroker
(UCB).
It provides access to the hierachical structure of the documents that
are active in a running OpenOffice.org process. As long as a document was
not closed, the TDCP can access it. All documents that have been loaded -
regardless of their persistent document format (sxw, doc, sxc, xls, ...)
or that have been created but not yet saved to any storage medium, are
supported. The TDCP is not able to load any documents itself. This is
exclusively done by the OpenOffice.org document handling framework. The
document contents provided by the TDCP represent live data, which may
differ from any persistent representation of the document, for instance,
because the user modified the document after loading, but did not yet save
it.
- Since
- OOo 2.0
- See also
- TransientDocumentsRootContent, TransientDocumentsDocumentContent, TransientDocumentsFolderContent, TransientDocumentsStreamContent
|


Plugin Information No information for the plugin 'gssh' is available. It may have been removed from distribution.
Welcome to our CI plugin named GSSH , this plugin is developed during our Tahoe CI project for more convenient as below feature list :
Feature list:
- Server Group management , We can create a server group with username , password ,port . Any servers create under this server group will auto inherit from its corresponding server group , So just input server name and ip . As we known that , During our test environment set up , different project often use the uniform server port , server user name ,and password . So it can avoid us to repeat to configure the same information once and once again .
- Support execute remote shell during pre-builder , builder and post-builder.
- Support execute remote commands .
- Support execute remote FTP task .


We'll be live soon.
Subscribe to keep informed.
Thanks for your subscription!
Please provide a valid email address!


I'm Ankit Wanjari, a final year B.Tech. Computer Science and Engineering student at NIT Agartala.
Currently, I'm an Software Technical Intern at Walkover. I'm also Tehcnical Head - II at college's robotics club i.e. ANARC.
My hometown is Raipur. I live in Agartala for college but in this pandemic, like most of all, I'm stuck at Raipur.


We want to bring as much awareness to this subject as we can, so here you can learn about actual issues themselves and the details about them. If you're going through something, here would be the best place on our website to inform yourself and figure out how you can best seek out help.
We have resouces to get help in emergency situations and for professional help.
You can get information on how and where to volunteer, support groups near you, and informatin on possible mental illnesses.
Annijah
Ethan
Damian
Gavin
Vinny
Uriel
Liz


{% extends 'base.html' %} {% block content %}
Add players
{{ username_error }}
{{ max_number_of_players_error }}
{{ no_players_error }}


Edit page for
??
First name(s)
Last name
👨 Male
👩 Female
Unknown
Birth date
Birth place
Date of death
Place of death
Submit
Cancel


First the finest fisherman around the block go out in the row boat and float down stream, then the fisherman use a technique that i'm not at liberty to tell you. The fisherman bring back the fish, from wherever they got it, and it is processed.
At Sam's Salmon Cookies Inc. we take pride in our product. As you can see, we use the finest state of the art appliances to deliver the best product, with the best quality!
after processiong the cookies are baked and molded into a pastry with exploding flavor.


3 referrals for Mike Smith
You need to book 2 appointments
Booking reference number 0002 7480 8900
Referred by
Dr Zubeir Smith at New Street Medical Practice
on 13 August 2018
Booking reference number 4452 7440 7243
Referred by
Dr Gillian Hall at New Street Medical Practice
on 3 September 2018
You have 1 appointment booked
Booking reference number 7843 8844 3340
Appointment: Monday 12 November 2018, 1:30pm
at General Respiratory Medicine-Respiratory Medicine-Leeds (Seacroft Hospital)-40671


Welcome to the Ten Forward lounge
Mingle with the ship’s complement.
Captain Picard
All tweets by @JoeSondow
Quark's Bar
Deep Space 9 Promenade
Quark's Bar on the Promenade
Delve into galactic intrigue.
Col. Nerys
realRealDukat tweets by @JoeSondow
All tweets by @JoeSondow
realRealDukat tweets by @JoeSondow


I'm Timothy Onyiuke, Mid-Level Web developer. I code mostly in PHP/Laravel.
Though, I spend most of my time learning about stuff I like, mostly Science.. and coding of course :). I'm quite curious and I like to think of myself as someone on a mission, I love Chess and Soccer.


My first four weeks at The Iron Yard consisted of using HTML, CSS and Javascript for Front End Development. I was having problems grasping the Flexbox concept. I talked with a couple of front-end developers I knew and they each said basically the same thing. They didn't know what I was talking about because they used Bootstrap. I understand now what the instructors were trying to do by teaching HTML and CSS...learn the basics and the rest will be easier to understand.
Recently I did a project that incorporated Bootstrap. When I first typed in the link to a CDN to pull in Bootstrap I was pleasantly surprised at the results. I put together these pages to help me see what some of the different parts of Bootstrap looked like. Then I tried putting it all together. These are just some of the things I've been trying with Bootstrap. They're not pretty, or sexy, they're for me to try things out.
At this time, Bootstrap v4 is still in beta so all of these pages incorporate Bootstrap v3.3.7.
Update: I've added pages using beta v4 code to see/try the differences since the beta will eventually become what is used in production.
Update: I've updated the pages that were originally created using beta v4 code to the latest stable release, v4.3.1.
Since I want these pages to be portable, I have not installed Bootstrap on my box. Each of the pages has a CDN call. There are calls to Font Awesome on some of the pages. As with Bootstrap, I have not installed Font Awesome on my box, any page that has a Font Awesome icon has a CDN call to Font Awesome.


--- title: Fiji Water -- Spin the Bottle layout: post ---
I sat down and sent out a few emails—filling friends in on my visit to the Fiji Water bottling plant, forwarding a story about foreign journalists being kicked off the island. Then my connection died. "It will just be a few minutes," one of the clerks said.
Moments later, a pair of police officers walked in. They headed for a woman at another terminal; I turned to my screen to compose a note about how cops were even showing up in the Internet cafés. Then I saw them coming toward me. "We're going to take you in for questioning about the emails you've been writing," they said.
Whoa, crazytown... I had no idea.


There are going to be big changes coming to the language this summer, so we are officially calling the current state 0.1. It is usable in the strictest sense of the word, but is missing a lot of the niceties you would expect in a modern programming language. On to 0.2!
The first paper on Tetra was published at the 5th NSF/TCPP Workshop on Parallel and Distributed Computing Education. The paper discusses the idea behind the language, and the current state of the implementation. It is accessible here. There is still a lot of work to do before a "0.1" release of the language, but it is beginning to take shape.
Thanks to the UMW Domain of One's Own program, Tetra has a fancy new web site. The project is still in the early stages, but I will be updating this site with progress on the language and tools as they are developed.


NOTE: If you are using Linux, the Repast site suggests that you download the standard version of Eclipse and add Repast from the Eclipse update site. We only tested this with the Luna version of Eclipse and received some Groovy errors. You should only use the version of Eclipse that is suggested in the Repast instructions, currently Keplar.
All of these steps were necessary because the Eclipse metadata files (.project and .classpath) are not part of the source code. Normally in Eclipse you would simply create a new project (such as a Java project) and point to the directory with the code you just cloned. For the Repast Simphony projects this generates errors and so we must use the workaround just mentioned. These extra steps aren't required for setting up the JADE agent projects. They're also not required when creating a project from scratch. If you ever need to start over, make sure to delete the .project and .classpath files from your file system, then delete the project from the project explorer. If you have to recover back to the original state, you may need to use the git checkout, reset, and clean commands.
These libraries aren't in the Common Simulation Framework source control to prevent having to add binaries. All of this can be simplified in the future using the Maven or Grails build tools.


Whether you are a business owner or an adventurer we think we can help you in your mission.
If you just want to say hello, want to partner-up or have some feedback please do contact us, we always reply.
Just drop us an email!
Mail usOur HQ is based in Florence, Italy
We speak 5 languages
We are all remote - thank you internet ;)
We started it all as a self-funded journey


We're dipping our toes into the iOS development waters.
We've been hacking away at HTML, CSS, and JavaScript for years now.
Launched the first version of Wylio.com, a Creative Commons image search and attribution service for Bloggers, featured on TechCrunch
Launched the new version of our Web service, still bootstrapping and profitable since our first year, we continued our slow growth strategy.
Rewrote our service using the cutting edge Meteor platform, continued building our programming skills.
As the new experience of parenthood approached for Daniel, we launched into iOS App development with Baby Apps™ an iPad and iPhone app for kids.
Developer
Developer


@(basePath: String, clientApp: ClientApp, scopes:Array[String]) Grant access to your account @for(i <- 0 until scopes.length) { } Application @{clientApp.name} requires following permissions: @for(scope <- scopes) { @scope }
Application @{clientApp.name} requires following permissions:


| Game | Publisher | Platform | Release Date(PS4) | Release Date(XO) |
|---|---|---|---|---|
| Save Your Nuts | Triple Scale Games | PS4 | 16/04/2020 | |
| XO | ||||
| Predator: Hunting Grounds | Sony Interactive Entertainment | PS4 | 24/04/2020 | |
| Moving Out | Team17 Digital | PS4 | 28/04/2020 | |
| XO | 28/04/2020 | |||
| Dread Nautical | Zen Studios | PS4 | 29/04/2020 | |
| XO | ||||
| Arcade Spirits | PQube Limited | XO | 01/05/2020 | |
| Maneater | Tripwire Interactive | XO | 05/05/2020 | |
| The Wonderful 101: Remastered | Platinum Games | PS4 | 05/05/2020 | |
| Ninjala | GungHo Online Entertainment | PS4 | 27/05/2020 | |
| Rock Of Ages 3: Make & Break | Modus Games | PS4 | 02/06/2020 | |
| XO | ||||
| Command & Conquer Remastered Collection | EA | PS4 | 05/06/2020 | |
| Warborn | PQube Limited | PS4 | 12/06/2020 | |
| XO | ||||
| Hunting Simulator 2 | Bigben Interactive | XO | 25/06/2020 | |
| Ghost Of Tsushima | Sony Interactive Entertainment | PS4 | 26/06/2020 | |
| Marvel’s Avengers | Square Enix | XO | 04/09/2020 | |
| Cyberpunk 2077 | CD Projekt Red | PS4 | 17/09/2020 |


WILD THINGS (1998) (Columbia) Starring: Matt Dillon, Kevin Bacon, Neve Campbell, Denise Richards, Bill Murray, Theresa Russell. Screenplay: Stephen Peters. Producers: Steven A. Jones and Rodney M. Liber. Director: John McNaughton.  Reviewed by Scott Renshaw.
If Hollywood is going to insist on making awful films, the least it could do is make them as wonderfully, hilariously awful as WILD THINGS. There is a kind of Zen preposterousness certain films achieve -- oh, let's use SHOWGIRLS as an example -- which makes them too much fun to dismiss. They become impromptu "Mystery Science Theater" experiences, where you find yourself hooting and commenting throughout the ridiculous situations, plaster-of-Paris acting and quotably appalling dialogue.
I'm not entirely sure that WILD THINGS isn't a huge, self-aware joke, attempting to combine the Joe Eszterhas oeuvre (SHOWGIRLS, BASIC INSTINCT, JADE) and grade-Z exploitation films bursting with busty women in the swamps. The plot begins with a South Florida high school guidance counselor named Sam Lombardo (Matt Dillon) who finds himself accused of rape by two of his students: pouty, flirtatious rich-girl cheerleader Kelly (Denise Richards), and wrong-side-of-the-tracks, tattooed, pot-smoking trouble-maker Susie (Neve Campbell). For the next 100 minutes or so it spins off into a dozen different twists and turns of double-dealing, accompanied by the kind of non-stop sleaze which would make Eszterhas proud. Soap opera threats snarled through clenched teeth? Yep. Career-threatening performances? You betcha. Chicks in cat fights? Check. Chicks in wet T-shirts? Check. Chicks making out with each other? Double-check. Gratuitous full-frontal shower shot of Detective Ray Duquette (Kevin Bacon) which reveals -- ahem -- just precisely how many degrees of Kevin Bacon there are? Double-double-check.
And yet, as undeniably wretched as virtually every moment of WILD THINGS is, I can't imagine anyone walking out on it. The same kind of perverse I-only-read-it-for-the-articles voyeurism which finds otherwise sensible people pausing when they flip past Jerry Springer could have you shaking your head and giggling non-stop. In fact, the pseudo-serious but scandal-grubbing television coverage of Lombardo's trial in WILD THINGS serves as an apt metaphor for what we should be expecting from the film. There's no way to take WILD THINGS seriously as a movie, any more than it's possible to take "Melrose Place" seriously as topical drama or "Hard Copy" seriously as journalism. It's a lowest-common-denominator side show of all the stuff we mock with knee-jerk superiority, yet still manages to do gangbuster ratings.
It is only a tremendously entertaining supporting turn by Bill Murray which makes it hard to forgive WILD THINGS all its trespasses. As Lombardo's ambulance-chasing attorney, Murray brings a genuine comic touch to the proceedings, one which doesn't force you to stop laughing to figure out whether the humor is intentional. When Murray's loose, confident work exists alongside the ham-fisted conniving of Kelly's nasty mother (Theresa Russell) and a smug member of the town elite (Robert Wagner), any possible sense of planned parody vanishes. Even the film's extended closing credits coda, which back-tracks to explain how all the plotting comes together, feels like a huge miscalculation. If it matters that much whether or not the plot makes sense, then WILD THINGS really _is_ that bad.
Perhaps it's just the eternal optimist in me which makes me want to believe there was a logic behind the perverse inanity -- or perhaps that's inane perversity -- of WILD THINGS. Or perhaps it's the need to find a reason why I'd rather sit through a film as bad as WILD THINGS again before I'd sit through a "better" film like TWILIGHT. I can't even call it a "guilty pleasure," because it's not the film I enjoyed. I did, however, immensely enjoy the act of _not_ enjoying it. Start-to-finish trash just doesn't get much trashier than this, unless a certain writer's name is attached to the script. Somewhere, very soon, Joe Eszterhas will be watching WILD THINGS and kicking himself because he didn't write it first.
On the Renshaw scale of 0 to 10 THINGS that go bomb: 3.
Visit Scott Renshaw's MoviePage http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the MoviePage for details, or reply to this message with subject line "Subscribe".
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Folders
<parent>
circular
linkedlist
linked_li...roject
advanced
Linked-List
linked_li...oblems
midpoint
Folders: 8


Hi
I have added a voltage input to my TX so needed to update the firmware, it now outputs correct values every 10 secs (I added a zero to the wait count as it was too often), when I check the output via the serial port all looks well.
I then updated the code on the emonBase (nanodeRF) and it outputs the wrong values?? nothing like what is being transmitted by the emonTX.
this is the payload for the TX
Serial.print(emontx.real1);
Serial.print(' ');
Serial.print(emon1.apparentPower);
Serial.print(' ');
Serial.print(emon1.Vrms);
Serial.print(' ');
Serial.print(emon1.Irms);
Serial.print(' ');
Serial.println(emon1.powerFactor);
and this is the payload on the Base
str.print("{rf_fail:0,");
str.print("RealPower:");
str.print(emontx.real1);
str.print(",ApparentPower:");
str.print(emontx.apparentpower);
str.print(",Mains:");
str.print(emontx.Vrms);
str.print(",Current:");
str.print(emontx.Irms);
str.print(",PowerFactor:");
str.print(emontx.powerFactor);
I have tried taking our the rf_fail flag also but didnt make a difference.
This is driving me crazy, any one have any idea what im doing wrong?
Thanks
Gary
Re: emonBase not sending same data as emonTX
When we refer to the 'payload' we are refering to the RF transmission payload. I think you have mixed this up with what the units are printing out to ther serial terminal. For example the emonTx single CT example transmitts the RF payload emontx.power and emontx.battery as defined near the beginning of the sketch:
It is this that must be the same on the emonTx and emonBase. Name of variables does not matter but number of and order does.
Re: emonBase not sending same data as emonTX
ok, i wrongly assumed that the serial print would be in the format the RF payload was sent? i changed the names to the same as a long shot.
So if i had the right values but in the worng order they would just be assigned to the wrong inputs?
I have started again with the latest sketches from GITHUB and its working fine with just the CT info, im using CT123Voltage and it seems to be more accruate than just using a CT on its own (voltage here is normally around 233V)
So how do I get it to send the Powerfactor etc and mains volatge as these would be interesting to trend. Is there a wiki type page on settingup the payload? (I have looked but may have missed)
Thanks
Re: emonBase not sending same data as emonTX
Good to hear you got it working.
To send another variable (e.g 'PF' and 'Vrms') just add it in to the payload on both the emonTx and emonBase:
Yes your correct, the order in which the variables are on the Tx will be the same order that they are received on the Rx, independant of what their called. The name of the variables in the payload don't matter, it's the order that does.
Re: emonBase not sending same data as emonTX
ok I understand now, got it sending all the data I want from Mains, next up Tempreture!
I might try and write up about fidling with payloads as its not so straight forward...
Re: emonBase not sending same data as emonTX
That would be fantastic. If you post what you write up on the forum initally then I will make it into a page titled 'customising the emonTx' or something similar.
Remember all pages on the site are an open wiki (once logged in) feel free to edit any page if you think you can improve it. Revision history is always saved.
Thanks.


How To Dog
Dat tungg tho pupperino length boy. borkdrive aqua doggo. Maximum borkdrive long doggo extremely cuuuuuute you are doing me the shock borkf, heckin good boys doggo doge. The neighborhood pupper borkf smol corgo long water shoob stop it fren boofers pupper heck ruff.
What is Dogs
Long doggo smol borking doggo with a long snoot for pats pupperino h*ck heckin angery woofer shoober aqua doggo heck doggo aqua doggo most angery pupper I have ever seen heckin angery woofer pupper. ruff adorable doggo very hand that feed shibe. Extremely cuuuuuute corgo waggy wags stop it fren.
Facts From Dog
Most angery pupper I have ever seen such treat heck, dat tungg tho. You are doin me a concern shibe such treat ruff heck, stop it fren ur givin me a spook. Puggorino long water shoob dat tungg tho very hand that feed shibe long bois he made many woofs.


Curiosity Music Guide
Music Player Information
Welcome to Curiosity Music !
First of it's good to understand that
the Queue and the Playlist are 2 complete
seperate things. The Queue are the songs you
and your fellow members want to play. The playlist
are the songs Curiosity will be playing after the
queue is finished. This can be toggle on and off
in the settings menu.
The Queue:
With the play command you can put songs queue.
Curiosity will play them one by one until it's empty
After this it will turn to the servers playlist
If the playlist is playing and you put a new song in
the queue. Curiosity will first play the songs in the queue
before switching back to the playlist.
The Playlist:
The first time Curiosity will play the playlist on
your server it will first inject all song to our database.
We have a pre-configured list (5000+) of songs ready to
go. You can completely modify your servers playlist if
you like to. With the save and delete command you can
add or delete song from it. You can also decide to make
a brand new server playlist. Then you can choose your
own songs to play after the queue is finished.
Saving and Deleting songs:
This can be done once a song is playing. These commands
do not take any input. You can right now not save or delete
a song that is not currently playing. If you want to save a
song, first put it in the queue. Then once it's playing
you can save it. The same counts for deleting a song.
In a later update we will make sure you can do this
in multiple ways.
DISCLAIMER
Currently this module is getting build on. Bugs can be
encountered. We are working hard on fixing these in the
future. Currently known bugs are the following.
* If a new server starts playing music the bot needs
to inject all the default playlists songs in the database.
This will result in all servers having laggy or no music
for a duration of 5 / 10 seconds. This bug can unfortunately
not be fixed but it also will not happen only once per server.
* Sometimes when the pause command is used Curiosity
will stop playing music but continues to transmit.
Because of this it does not register it is paused and
the resume will not work. to fix you need to let the
bot rejoin the voice channel.
* If music commands are used to fast after each other
the music can start to skip every 2 seconds. To prevent
this we have put in a 10 second cooldown between each
time a command is used. If it does occure letting the bot
rejoin the voice channel is the solution.
* Sometimes a song stops before it actually is finished.
This is an internal bug within the FFMPEG. This module
converts the videos to an mp3. In here it sometimes
go's wrong. I can not fix this but if i have a better
alternative i will switch to
Welcome to Curiosity Music !
First of it's good to understand that
the Queue and the Playlist are 2 complete
seperate things. The Queue are the songs you
and your fellow members want to play. The playlist
are the songs Curiosity will be playing after the
queue is finished. This can be toggle on and off
in the settings menu.
The Queue:
With the play command you can put songs queue.
Curiosity will play them one by one until it's empty
After this it will turn to the servers playlist
If the playlist is playing and you put a new song in
the queue. Curiosity will first play the songs in the queue
before switching back to the playlist.
The Playlist:
The first time Curiosity will play the playlist on
your server it will first inject all song to our database.
We have a pre-configured list (5000+) of songs ready to
go. You can completely modify your servers playlist if
you like to. With the save and delete command you can
add or delete song from it. You can also decide to make
a brand new server playlist. Then you can choose your
own songs to play after the queue is finished.
Saving and Deleting songs:
This can be done once a song is playing. These commands
do not take any input. You can right now not save or delete
a song that is not currently playing. If you want to save a
song, first put it in the queue. Then once it's playing
you can save it. The same counts for deleting a song.
In a later update we will make sure you can do this
in multiple ways.
DISCLAIMER
Currently this module is getting build on. Bugs can be
encountered. We are working hard on fixing these in the
future. Currently known bugs are the following.
* If a new server starts playing music the bot needs
to inject all the default playlists songs in the database.
This will result in all servers having laggy or no music
for a duration of 5 / 10 seconds. This bug can unfortunately
not be fixed but it also will not happen only once per server.
* Sometimes when the pause command is used Curiosity
will stop playing music but continues to transmit.
Because of this it does not register it is paused and
the resume will not work. to fix you need to let the
bot rejoin the voice channel.
* If music commands are used to fast after each other
the music can start to skip every 2 seconds. To prevent
this we have put in a 10 second cooldown between each
time a command is used. If it does occure letting the bot
rejoin the voice channel is the solution.
* Sometimes a song stops before it actually is finished.
This is an internal bug within the FFMPEG. This module
converts the videos to an mp3. In here it sometimes
go's wrong. I can not fix this but if i have a better
alternative i will switch to


Step 2 of 4
This is the product information that will be saved in the Open Data CHPL database and associated with this Certified Product.
This is the product information that will be saved in the Open Data CHPL database and associated with this Certified Product.
This is the product information from your Upload File.