Closed kwhat closed 5 years ago
What would happen with columns which clash with SQL key words and functions in this case?
@Caffe1neAdd1ct user can manually escape in the query. The current escape is not quite correct as it should do 'table'.'column' instead of 'table.column'. I may go back and fix that if I can find a clean way to get it done.
Good point, that would be fine.
However inside backticks I think full stop characters are allowed, at least in MySQL...
If not quoted with backticks already by the user, splitting on the full stop then quote on the 2 identifiers, if already quoted.. leave alone?
On Fri, 4 May 2018, 19:07 Alex Barker, notifications@github.com wrote:
@Caffe1neAdd1ct https://github.com/Caffe1neAdd1ct user can manually escape in the query. The current escape is not quite correct as it should do 'table'.'column' instead of 'table.column'. I may go back and fix that if I can find a clean way to get it done.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FaaPz/Slim-PDO/pull/101#issuecomment-386687586, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRA5MUzl6mgIir6EphwH4XnD1dTqKuwks5tvJjkgaJpZM4TzCdC .
@Caffe1neAdd1ct yah I'm working though it right now. Should have an update shortly.
I have removed the back-ticks as the current approach is very broken. I have also added union support to select and sub-query support in various places.
Fixes issues with SELECT
*
andtable.column
.