4
Hey, guys, let’s go So I’m having a problem which is this, I have a table players, a table workouts and an auxiliary table playfulness (where I’ll see if any players are training at the moment) The point is, how can I make it so that when I create a workout, this auxiliary table is populated with the training ID I just created and the players id. For example, in my interface I select a practice and select players who will participate, by clicking on the "Start training" button I want, in addition to creating a column in the table workouts, with auto-increment ID, I want you to create in the table playfulness a line with the ID that has just been generated. I hope I illustrated it well haha. In java it would be using Statement.RETURN_GENERATED_KEYS, but in PHP I no longer manjo. Someone knows how to do?
What extension is used in PHP to interact with DB?
– Bacco
Want to get the last id inserted in that table this? vc need to tell which API is using for connection in the database.
– rray
@Bacco I am using PDO connection
– LMaker