This topic is locked

custom expression in sqlite

4/11/2012 8:50:47 AM
PHPRunner General questions
M
mune72 author

In a custom expression I did a concatenation of strings.
As it was working in the standard sqlite client and not in phprunner's field editor, I became sospicius.
I made a custom expression very very simple: '1+1' || ' is 2'
Then I pressed the button to test it; the dropbox filled (of course with the same string "1+1 is 2").
Everything was ok so I pressed build
But in firefox when I open the page with the button with custom field the app crashes.
As I mentioned before using fields of the qury the concatenation works in the sqlite client but not in the phprunner. Is there a special trick?
Thanks

Sergey Kornilov admin 4/11/2012

I would suggest to contact support directly sending a copy of your project file and a sample database for investigation.

M
mune72 author 4/12/2012

Half solved:
Probably due to a modification needed in the past (in the phprunner source tree to use sqlite), I have to write something like

Customer.FamilyName || ' ' || Customer.Name


But still the "test it" works and app crashes.
PS

There is also a bug in sqlite (I'll write to them): 'a' || 'b' gives ab while 'a' || <null string> gives a null

Sergey Kornilov admin 4/12/2012

There is no bug in SQLite. You cannot concatenate NULL values. You need to make sure there are no null values. Replace NULLs with empty strings - that might help.

M
mune72 author 4/12/2012



There is no bug in SQLite. You cannot concatenate NULL values. You need to make sure there are no null values. Replace NULLs with empty strings - that might help.



Ok, I will do it; but the problem still exists even when no string is null.