[eluser]tomcode[/eluser]
Quote:Never has for me, if nothing is updated it doesnt return TRUE
@thepyromaniac: This is very strange. Can You give Your environnement ?
I'm working on WinXP under
Apache/2.2.3 (Win32) PHP/5.2.0 MySQL/5.0.22
Apache/1.3.33 (Win32) PHP/4.3.10 MySQL/3.23.49
I've checked again the code:
the update() method:
returns
FALSE or exists (with
$this->db_debug enabled) if one of its params aint valid.
else it 'just' returns the central query() method:
returns
FALSE or exists (with
$this->db_debug enabled) if one of its params aint valid.
returns
$this->CACHE->read($sql) if cache is on
returns
FALSE if
$this->simple_query($sql) returns false
returns
TRUE for write_type queries
returns
TRUE if param
$return_object (the third one) is other than TRUE
returns the created result object
new 'CI_DB_'.$this->dbdriver.'_result'
That's it.
The comment: (which omits to mention the third param)
Code:
<?php
/**
* Execute the query
*
* Accepts an SQL string as input and returns a result object upon
* successful execution of a "read" type query. Returns boolean TRUE
* upon successful execution of a "write" type query. Returns boolean
* FALSE upon failure, and if the $db_debug variable is set to TRUE
* will raise an error.
*
* @access public
* @param string An SQL query string
* @param array An array of binding data
* @return mixed
*/
function query($sql, $binds = FALSE, $return_object = TRUE)
{
I get the behaviour as decribed in the comment above.