# |
May 16th 2019, 14:09 |
patox44 |
@ndm I tried it and I got `Call to undefined method Cake\Database\Log\LoggingStatement::lastInsertedId()` |
# |
May 16th 2019, 14:08 |
niel45 |
damn, forgot about that :-) |
# |
May 16th 2019, 14:07 |
ndm |
`$results` will be a statement object.... `$results->lastInsertId()` |
# |
May 16th 2019, 14:07 |
patox44 |
okay. I thought it's something like mysqli_inserted_id() in ConnectionManager |
# |
May 16th 2019, 14:07 |
niel45 |
then use SQL to ask for the last id using the SQL function ;-) |
# |
May 16th 2019, 14:06 |
patox44 |
yes |
# |
May 16th 2019, 14:06 |
niel45 |
so you did a raw query? |
# |
May 16th 2019, 14:06 |
patox44 |
this query is in pure SQL not ORM |
# |
May 16th 2019, 14:06 |
patox44 |
I don't have entity for it. We create cakePHP only for REST and some parts of project doesn't have entities |
# |
May 16th 2019, 14:06 |
niel45 |
assuming you just saved it, of course |
# |
May 16th 2019, 14:05 |
niel45 |
You don't need to, just access $entity->id from the saved entity |
# |
May 16th 2019, 14:03 |
patox44 |
how Can I get last inserted ID via ConnectionManager class? |
# |
May 16th 2019, 13:52 |
Arckame |
sometime you are so focused on something you can read the doc 20 times without seeing whats wrong. |
# |
May 16th 2019, 13:46 |
admad |
congrats, you played yourself :P |
# |
May 16th 2019, 13:43 |
Arckame |
@admad, I have found the issue, i was creating a new entity directly and not using the TableClass->newEntity() method.. :D |
# |
May 16th 2019, 13:40 |
info315 |
The function, gets called i placed a breakpoint inside. |
# |
May 16th 2019, 13:40 |
info315 |
If the value is (int)0, the cakephp still save the value, even if the validation rule return false. |
# |
May 16th 2019, 13:39 |
info315 |
Hi, i have a quick question about allowEmptyString. This field could have three states: (int)0, (int)1 or null. |
# |
May 16th 2019, 13:29 |
niel45 |
never happens to me. No one I know is dumb enough to try stopping me from eating |
# |
May 16th 2019, 13:29 |
np |
TEST: Missing CSRF token cookie |
# |
May 16th 2019, 13:29 |
admad |
hypocrite :P |
# |
May 16th 2019, 13:29 |
ricksaccous |
oh well |
# |
May 16th 2019, 13:28 |
ricksaccous |
it's actually a pet peeve of mine when i'm eating and someone takes a picture of the food or says wait don't touch it to take a picture though i'm guilty of taking pictures of food from restaurants to show to family/friends |
# |
May 16th 2019, 13:28 |
josbeir |
thats all that counts |
# |
May 16th 2019, 13:28 |
niel45 |
is IRC social media? |
# |
May 16th 2019, 13:28 |
josbeir |
my stomach sure did take that claim very serious tho |
# |
May 16th 2019, 13:28 |
ricksaccous |
hahaha |
# |
May 16th 2019, 13:27 |
admad |
> did you instagram it? Now that's a question that really matters. Can't claim something until you have shared it on at least one social media |
# |
May 16th 2019, 13:27 |
josbeir |
i'm not a foodstragrammer |
# |
May 16th 2019, 13:27 |
ricksaccous |
now you're just getting fancy |
# |
May 16th 2019, 13:27 |
josbeir |
i did not sorry |
# |
May 16th 2019, 13:26 |
josbeir |
linguini frutti di mare |
# |
May 16th 2019, 13:26 |
ricksaccous |
did you instagram it? |
# |
May 16th 2019, 13:26 |
josbeir |
in that case it was delicious |
# |
May 16th 2019, 13:26 |
ricksaccous |
a sea snail is still a snail |
# |
May 16th 2019, 13:26 |
ricksaccous |
I'd say it does |
# |
May 16th 2019, 13:26 |
josbeir |
i ate some sea snails but guess that doesnt count |
# |
May 16th 2019, 13:25 |
josbeir |
actually... i was in nice a week ago.. |
# |
May 16th 2019, 13:25 |
ricksaccous |
these are important things to know |
# |
May 16th 2019, 13:25 |
ricksaccous |
@dereuromark do you bake? |
# |
May 16th 2019, 13:25 |
ricksaccous |
@josbeir you eat any snails lately? |