First column value not inserted

QuestionsFirst column value not inserted
Bo Knuth asked 9 years ago

I've successfully created several grids, but with one of them the value I enter for the first column in the grid is not inserted into the record in the db table. It doesn't matter which db column I reference for the first column in the grid. My workaround was to add a column to the db table (id), reference it in the first column in the grid and configure it as hidden. This is with mysql.

Then I found this…

https://phpgrid.desk.com/customer/portal/questions/8093739-bug-insert-syntax-on-mssql

I added this

$col["autoid"] = false;

to the first column in the grid and all is well. But I didn't have this problem with any of the previous grids I created.

1 Answers
Abu Ghufran answered 9 years ago

Usually, the first column of table is set to auto increment id.
So this is true by default and not needed to be set.

But for the tables where there is no auto id, you must set it so that your field is used in INSERT query.

Your Answer

7 + 3 =

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?