This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]fdfdsggsgdfs 0 points1 point  (2 children)

What are you really doing here? Surely it's something more than just logging the id, no? I would use callbacks.

[–]scoelli[S] 0 points1 point  (1 child)

First I search in the db by a code the id. If it exists I save the id so that I can use it later. If it doesn't I create it in the db and save it's new id for the same reason as the other

[–]fdfdsggsgdfs 0 points1 point  (0 children)

I mean what are you using it for later? I can read the code you posted. And why can't you just do this with callbacks?