Welcome Guest, Not a member yet? Register   Sign In
$this->dbutil->backup() does not protect table names
#1

[eluser]davidbehler[/eluser]
I have a table called 'group' and using
Code:
$this->dbutil->backup()
I get an SQL error:
Code:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group' at line 1

SELECT * FROM group

That's caused by not protecting the table name using backticks as 'group' is a reserved name in SQL.

For now I will have to create my own backup function that does not have this flaw, but I hope this will be fixed soon and I can use the CI function againg Smile


Messages In This Thread
$this->dbutil->backup() does not protect table names - by El Forum - 05-28-2009, 11:34 AM
$this->dbutil->backup() does not protect table names - by El Forum - 05-28-2009, 11:54 AM
$this->dbutil->backup() does not protect table names - by El Forum - 03-30-2010, 09:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB