Fields with spaces break the program

QuestionsFields with spaces break the program
Randy Blair asked 4 years ago

I have many fields/columns that have spaces. The program breaks when in form mode and submit is pressed. It will try to put underlines in the field name and then it errors out because there is no field with that name.
I don't have an option to rename the fields, so is there a fix for this?

3 Answers
Abu Ghufran answered 4 years ago

The latest build make grids display those fields.
Limitation is the add/update/delete operations will not be functional.

Emailed you an update.

Randy Blair answered 4 years ago

That is not acceptable. The add/update/delete operations have to be functional.
Forms no longer pop up. This is a catastrophic loss for my application, and if it can't be fixed, I will need my money back, please.

Abu Ghufran answered 4 years ago

Thread resolved on email. Updating ticket just to log solution and help others.

You will need to alias the spaced fields with '-' and set query in select_command. e.g.

$g->select_command = "SELECT `i d` as `i-d`, `client id` AS `client-id`, `inv date` AS `inv-date` FROM invheader";

Rest functionality (add/update/del/search) will be handled by library.
Updated build may be required.

Your Answer

19 + 8 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!