Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] CO-1441 escape or avoid reserved SQL words ?

Subject: COmanage Developers List

List archive

[comanage-dev] CO-1441 escape or avoid reserved SQL words ?


Chronological Thread 
  • From: Tom Zeller <>
  • To:
  • Subject: [comanage-dev] CO-1441 escape or avoid reserved SQL words ?
  • Date: Mon, 5 Jun 2017 16:26:30 -0500
  • Ironport-phdr: 9a23:mpgg+hDyEiSzL1lZWvYfUyQJP3N1i/DPJgcQr6AfoPdwSPT8p8bcNUDSrc9gkEXOFd2CrakV1KyL4+u4ACQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9GiTe5Y75+NhW7oAbeusUKnIdpN7o8xAbOrnZUYepd2HlmJUiUnxby58ew+IBs/iFNsP8/9MBOTLv3cb0gQbNXEDopPWY15Nb2tRbYVguA+mEcUmQNnRVWBQXO8Qz3UY3wsiv+sep9xTWaMMjrRr06RTiu86FmQwLuhSwaNTA27XvXh9RxjKxbrhyvpAFxzZDIb4yOKPpyYrnQcc8GSWZdXMtcUTFKDIOmb4sICuoMJfhWr474p1ATrhSxGw2sBOfxxT9Sm3T72rE60uU/HgHC2AwvAcgOvW/PrNXtNKcdT/q1zKjUwjrZa/NZxTD96YbHchA7pvGMQKpwfdDNxkkoEgPIl1OdopHrMTOS0+QCqWmb7+x4WOKqi28nsBhxojy1ysgwjYnJg4QYwU3H+yVh2Is5O9y1RFJ5bNOhHptdtDqVO5dzT84tX21kpDs1x7gatpKnYScHzZEqywDBZ/OZa4SF4B3uWPyMLTp6gH9pYr2yiwqo/UWh1OHxUNS/3kxQoSpfiNbMs2gA1xzN5ciDTftw5kKh1iyO1wDX8+1EOFw0mbbCJ58u3LI8iIQcvV7MHi/xn0X2g6uWeVs+9ue07OTnZ63qpp6aN4BqlgHzKroil82jDek6NwUOUWuW9v+g2LDm8kD1XKlGgeAzn6bFrJzVOMEWq6unDwNLzIkv8xO/AC2n0NQck3kHNlVFeBefgoj1OlDBPvT4DfOhjFS2izpr3OjGPr3/DZXXL3jMjK3ufbJh5E5bxgszwspf55VJCrEZOv78RkjxtNnAAh8jLwO02/rnCMl61o4GRW2PBaqZP7nUsVCS6eIgPfCAa5ILtzbjMPUl4//ujWQlmV8GY6Wlx5oXaHakHvt4OUWZZ2TjgssfHWsQoAUxUfHq2xW+VmtYYHO7Wasz63Q3BZyODIHfS5qrjaDbmiq3A854fGdDX2yLFD/aeoGAVu1EPD6AL8tlnyYsTqChRpUg3hiqvwjlxKBgM/KS8Sod48GwnONp7vHewElhvQd/CN6QhjmA

It looks like the fundamental error in CO-1441 is attempting to create
a column whose name is a reserved SQL word (in MySQL) : 'int1'.

One fix is to escape the column name / reserved word. Another is to
dis-allow reserved words.

Anyone know if there is a db-agnostic function in PHP or CakePHP for
escaping SQL strings ?

I see mysqli->real_escape_string() and pg_escape_string(), but
obviously those are db-specific.

Thanks !
Tom

https://dev.mysql.com/doc/refman/5.5/en/keywords.html



Archive powered by MHonArc 2.6.19.

Top of Page