Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel 8 selecet the 2nd to the last record

        $news1 = DB::table('posts')->where('xstatus',1)->where('status','published')->orderBy('seq','DESC')->skip(0)->first();
        $news2 = DB::table('posts')->where('xstatus',1)->where('status','published')->orderBy('seq','DESC')->skip(1)->first();
        $news3 = DB::table('posts')->where('xstatus',1)->where('status','published')->orderBy('seq','DESC')->skip(2)->first();
 
PREVIOUS NEXT
Tagged: #laravel #selecet #record
ADD COMMENT
Topic
Name
1+9 =