wearethefoos / codeigniter_gasoline Goto Github PK
View Code? Open in Web Editor NEWCakePHP-like Models, Behaviors, and Validation
CakePHP-like Models, Behaviors, and Validation
Undefined variable "$options"
public function update_all($collection = "", $data = array())
{
if (empty($collection))
{
show_error("No Mongo collection selected to update", 500);
}
if (is_array($data) && count($data) > 0)
{
$this->updates = array_merge($data, $this->updates);
}
if (count($this->updates) == 0)
{
show_error("Nothing to update in Mongo collection or update is not an array", 500);
}
if (isset($this->wheres['_id']) and ! ($this->wheres['_id'] instanceof MongoId))
{
$this->wheres['_id'] = new MongoId($this->wheres['_id']);
}
try
{
$options = array_merge($options, array($this->query_safety => TRUE, 'multiple' => TRUE));
$this->db->{$collection}->update($this->wheres, $this->updates, $options);
$this->_clear();
return (TRUE);
}
catch (MongoCursorException $e)
{
show_error("Update of data into MongoDB failed: {$e->getMessage()}", 500);
}
}
Please add new parameter for $options in update_all function.
public function update_all($collection = "", $data = array(), $options = array())
Thanks
Safim
Fetal error on "like " query
public function like($field = "", $value = "", $flags = "i", $enable_start_wildcard = TRUE, $enable_end_wildcard = TRUE)
{
$field = (string) trim($field);
$this->where_init($field);
And original function is with "_" (underscore).
private function _where_init($param)
{
if ( ! isset($this->wheres[$param]))
{
$this->wheres[ $param ] = array();
}
}
Undefined variable "$fields"
elseif (is_array($fields))
{
foreach ($fields as $field)
{
$this->updates['$pop'][$field] = -1;
}
}
return $this;
}
I think it should like this
elseif (is_array($field))
{
foreach ($field as $fld)
{
$this->updates['$pop'][$fld] = -1;
}
}
return $this;
}
What do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.