cannot update when using select_command

Questionscannot update when using select_command
Mike Enos asked 2 years ago

Hi, I am doing something like

$g->select_command = “SELECT customer_id, city FROM customers WHERE customer_id = ‘ALFKI'”;

When I try update a field, I get an error message.


But if I select using     $g->table = “customers”;

I have no issues.

I need to use a SQL statement to return some records and then be able to update them.

How is this accomplished?


1 Answers
Abu Ghufran Staff answered 2 years ago

Hi, You need to set table property in both cases. The select_command is not the replacement of table property. It will just override the select * from table query.

Abu Ghufran - Dev Team
Grid 4 PHP Framework
Your Answer

16 + 13 =

Login with your Social Id:

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?