Welcome Guest, Not a member yet? Register   Sign In
It is required that the primary_key be called "id"?
#1

I was doing a simple crud with ci4 and everything went very well until I noticed that to eliminate some element of a table from the forced field table the primary_key has to be called "id"


This is the function that I use to eliminate

elimination of public functions ($ key) {
$ this-> crud_model-> delete ($ key);
return redirect () -> to ("/ crud");
}

When I see the error between a system / Model.php and I see that there is a global variable called primaryKey with "id" as the default value.

My question is, what should I do to be able to use that function without my primary key field being called "id"?

Excuse me for my english, greetings from Cuba
Reply


Messages In This Thread
It is required that the primary_key be called "id"? - by cjam - 08-19-2018, 02:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB