STEPS To reproduce:
Put a cDBSimpleQuery in any form. Set the SQL property to any query containing a constant string, like this:
select 'X' as hilera
Run the form.
Error message
arse error: syntax error, unexpected 'X' (T_STRING) in C:PHsPeedxampphtdocsgestionit_libstest2_dbsquery_1.php on line 12
The generated file looks like this:
class test2_dbsquery_1 extends spdbsimplequery {
public function __construct($app, $form) {
parent::__construct('test2_dbsquery_1');
$this->app=$app;
$this->sql='select 'X' as hilera';
}
This does not happens if I use a cDBQuery, because the assignment to the sql property is enclosed in double quotes:
(taken from another, cDBQuery component generated file)
...
$this->selectSQL="select pkCasa,nombreCasa,'X' as hilera ".
...