MohammedAttya

Experience

1,530

0 Best Reply Awards

  • Member Since 6 Months Ago
  • 14 Lessons Completed
  • 0 Favorites

21st September, 2018

MohammedAttya left a reply on Get Ids For Insert Bulk • 4 days ago

@Cronix this is the function that laravel using for insertGetId() and it is returning last inserted ID for current session

I had issue with getting the correct IDs I found that MySQL returning the first ID of bulk insetred rows (not the last one as I expected)

20th September, 2018

MohammedAttya left a reply on Get Ids For Insert Bulk • 5 days ago

I solved this problem using app('db')->getPdo()->lastInsertId() after insert so I got the last inserted id

MohammedAttya started a new conversation Get Ids For Insert Bulk • 5 days ago

I want to insert bulk on database and get rows id (first one, last one or all rows)

I tried insertGetId but it took only one row per time

Is there any way to get the query object of insert or run anonymous function with it to run `$id = $query->getConnection()->getPdo()->lastInsertId($sequence);

` on it ?

6th July, 2018

MohammedAttya left a reply on PHP Advanced Topics • 2 months ago

@klick I updated the thread so my question will be clear

MohammedAttya started a new conversation PHP Advanced Topics • 2 months ago

Hello, I want to upgrade my skills in PHP. So I want to learn the advanced topics in PHP e.g: iterators, lambdas, design patterns .. etc

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.