DBQuery SQL sentences works ok as long as they are single line. But when I enter a multiple-line sentence, run the app and then try to edit the sentence again, all lines but the first one are lost.
PHsPeed 1.3.0 B7 - X64, PHP 7.4.5, MariaDB 10.4.11 (out of the Box PHsPeed)
Steps to reproduce:
- Create an empty project, with the samples connections.
- Put a Grid, a Datasource, and a DBQuery in any form, link them and set the DBQuery SQL property to
select dept_no, dept_name, mydate, yourdate from departments order by dept_name
- Open and set the fields in the DBQuery and Grid component.
- Run the form
- Go back to the Project tab and edit the SQL Sentence to make it multi-line, like:
departments order by dept_name
- Run again the form
- Go back to edit the SQL Sentence: you will find ONLY the first line:
Although not easy recognizable it is the same issue as https://www.phspeed.com/bt/index.php?do=details&task_id=327
CrLf is not allowed in properties. It is currently (as of 1.3.0 build 8 ) fixed by replacing these by spaces. But that will reformat the statement to one single string.
For html templates there is a function to convert these chars to br /. For this there are two buttons, 'make template' and 'undo template'.
This is not usable for sql though as br/ pairs leads to syntax errors. We are working on a similar formatting button so that it will create a better readable sql from string.