Welcome Guest, Not a member yet? Register   Sign In
Database query with where clause for column string is in error
#2

[eluser]Unknown[/eluser]
I found the cause of the problem.
The _execute function in db2c_driver.php call _prep_query function which call @db2_escape_string($sql).
The @db2_escape_string function will modify ' to '' that caused the error.

Commenting out the _prep_query function solved the problem.

function _execute($sql)
{ /* comment the following line out */
// $sql = $this->_prep_query($sql);
if (!$this->conn_id) echo "**** CONNECTION NOT ACTIVE ****";
$sql = str_replace("\n", ' ', $sql);
log_message('debug', "SQL: $sql");
return @db2_exec($this->conn_id, $sql);
}


Messages In This Thread
Database query with where clause for column string is in error - by El Forum - 06-02-2011, 01:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB